Racking my brains on this. Have tried a number of methods and binned them.
Need to get the column names and field values based on a dynamic build list of columns.
Example. I have MyTable with ID, ColA, ColB...etc.
Lets say the list of columns is ColB, ColC, ColF
So I would want to see the data returned as
ID ColName colValue
1 ColB 100
1 ColC 0
1 ColF Null
2 ColB 200
2 ColC 1753-01-01
2 ColF 100
The list will need to be a variable holding the column names.
thanks in advance.