PIVOT / UNPIVOT in SQL Server 2008
- by Nev_Rahd
Hello
I got child / parent tables as below.
MasterTable:
MasterID, Description
ChildTable
ChildID, MasterID, Description.
Using PIVOT / UNPIVOT how can i get result as below in single row.
if (MasterID : 1 got x child records)
MasterID, ChildID1, Description1, ChildID2, Description2....... ChildIDx, Descriptionx
Thanks