Avatar of Sarma Vadlamani
Sarma Vadlamani

asked on 

oracle query

i have multiple columns in table with Y or N value.
i want to reture only Y value colmuns how can I do in a query

ex data

empNO  col1  col2  col3  col4  col5  col6  col7   col8   col9
1               Y          Y      Y      N      N        Y      N       Y         Y
2               N          Y      Y     Y        Y         N      N       Y        N
3               Y         N     Y      N         Y        Y      N       Y         Y
4               Y          Y    N       Y          N     N       N       Y         N
5               Y          Y      Y      N        N        Y      N       Y         Y

only the columns with Y should come for each row
thanks.
Oracle Database

Avatar of undefined
Last Comment
Sean Stuber

8/22/2022 - Mon