Welcome to
Sunday, December 22 2024 @ 09:07 am UTC

The following comments are owned by whomever posted them. This site is not responsible for what they say.
Guyana Birding News - Volume 6
Authored by: Anonymous on Wednesday, December 26 2012 @ 05:42 am UTC
PIVOT itself aggagerte, Not sure why you are doing by hand SELECT [1] AS January' ,[2] AS February' ,[3] AS March' ,[4] AS April' ,[5] AS May' ,[6] AS June' ,[7] AS July' ,[8] AS August' ,[9] AS September' ,[10] AS October' ,[11] AS November' ,[12] AS December'FROM ( SELECT MONTH(OrderDate) AS MonthNumber', OrderID FROM Sales.Sales WHERE YEAR(OrderDate) = 2002 ) AS DataPIVOT( COUNT(OrderID) FOR MonthNumber IN([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12]) ) AS PVT