I have a table
The above table is the master table. I want to devide them based on caption - like all plan,content and accuracy to group based on parentid.
Need help me with this. Thanks
You can use a PIVOT for this.
SELECT * FROM
(SELECT ParentID, Caption, Name
FROM #table) AS t
FOR Caption IN ([Plan], [Content], [Accuracy])
) AS pvt