Hi There,
I have a dynamic query that returns a table with few rows but this result set has dynamic number of columns and names. Like,
Like, resultset with 2 column here
StudentID - StudentName
1 - Johm
2 - Patrick
3 - Bob
Or The resultset could be with 1 column
Dept.
Maths
English
Now we'd like to convert and store this data into a Key-Value Pair table as below
RowID - Key - Value
1 StudenID 1
1 StudentName John
2 StudentID 2
2 StudentName Patrick
3 StudentID 3
3 StudentName Bob
4 Dept Maths
5 Dept English
We tried with XML path, browsing node, etc, but couldn't add this RowID type of field which establishes the link between rows... i.e. ROWID1 for two rows in my target should tell me that there were Student ID 1 and his name is John.
Is there a way please?