Hi,
I am using following pivot to get the result but getting error
When i use select * from tableName i am getting following data
I want data like this
datewise headCount.
I am using following pivot to get the result but getting error
Code:
SELECT StartDate,[headCount] AS headCount FROM (SELECT StartDate, headCount FROM SAR_HeadCount ) ps PIVOT ( headCount for StartDate IN ([headCount]) ) AS pvt
Code:
[B]StartDate[/B] [B]Headcount[/B] 08/01/2010 182 08/08/2010 176 08/15/2010 198 08/15/2010 192
Code:
[B]08/01/2010 08/08/2010 08/15/2010 08/22/2010[/B] 182 176 198 192
Comment