Well, you can do something like this:
;with CTE as
(SELECT *
FROM #office_info_by_location_id
PIVOT (MAX(total_offices) FOR month IN ([2008-03],[2008-04])) AS temp)
select location_name,
isnull([2008-03], 0) as [2008-03],
isnull([2008-04], 0) as [2008-04]
from cte
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon