z**********8 发帖数: 2049 | 1 WITH PivotData AS
(
select CalendarYear, state, personid
from [dbo].[tblImportPerson])
select CalendarYear, [2008], [2009]
from pivotData
pivot ( sum(personid) for state IN ([2008],[2009])) as p;
--Msg 102, Level 15, State 1, Line 9
Incorrect syntax near ')'.
谢谢! |
|