Need your help in query for the following scenario.
Table1
Name -ID1 - ID2 - ID3 - IDn A1 - NULL - 11 - 12 - nn A2 - 14 - NULL -11 -nn
The above table need to translated like below
Table2
Name - ID A1 - 11 A1 - 12 A2 - 14 A2 - 11
The id values in table1 could be till ID50. The table2 would be the output based on table 1. All the null values would not be considered. What is the best way to do this. Any way to do this dynamically as the ID values would be atleast like ID1 - ID50
Can anyone help me with a query on how to do this. Thanks a lot