I am using following pivot query but not getting result as single row getting as 4 rows.
One more problem i am unable to pass dates as parameters to storeprocedure something like this
select [@date] .
SELECT 'Forecasted' AS HeadCount,
[8/1/2010], [8/8/2010], [8/15/2010], [8/22/2010]
FROM TblEmpCount) AS SourceTable
FOR StartDate IN ([8/1/2010], [8/8/2010], [8/15/2010], [8/22/2010])
) AS PivotTable;
I am getting result as 4 rows but i want result in single row like this
HeadCount 8/1/2010 8/8/2010 8/15/2010 8/222/2010
Forecasted 191 182 176 169
View Complete Post