I have the following query :
SELECT * FROM Table1 PIVOT ( SUM(Value) FOR [Period] IN ([06/1/2007],[07/1/2007]) ) AS p
Some of the rows
Ohh, I was using ISNULL in the wrong place.
ISNULL
the query should look like this:
SELECT ID,ISNULL([06/1/2007],0), ISNULL([07/1/2007],0) FROM Table1 PIVOT ( SUM(Value) FOR [Period] IN ([06/1/2007],[07/1/2007]) ) AS p