Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Require help with Pivot table query in SQL Server 2008

$
0
0

Hi,

I have a query regarding converting columns to rows in SQL Server 2008. Please look at the table below. 


I need the output to look something like this :


The columns for the children can be dynamic or fixed ( max of 6 children) based on the Family_ID.  For Example: A family can have 1 child or more than 1 child.

Not sure how to go about it. Would appreciate your help :)



Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>