Hi,

I have a table with almost 100 columns. Ex:

ID ColA ColB ColC
2 Null Word Excel

3 Access Paint Null

Expected result set is :

ID ColA ColB ColC ColumnNames IsEmpty

2 Null Word
Excel ColA
Yes

2 Null Word
Excel ColB
No

2 Null Word
Excel ColC
No
3 Access Paint Null ColA
No

3 Access Paint Null ColB
No
3 Access Paint Null ColC
Yes

I would like to list all the column names against each record of the table and and would like to keep track whether the column is empty or nonempty. How can I write SQL query for this?

Thanks