This is my technical area for troubleshooting and learning new programming skills and much more. Here, you will find answers on a wide range of technologies such as AI, Machine Learning, OpenAI, Databricks, ASP.NET, C#, Python, Microsoft Access, MySQL, Amazon Web Services, SQL Server, PL/SQL, JD Edwards, SAS, Salesforce, APIs, MVC, and many others. Please feel free to visit and join the discussion!
Friday, April 25, 2014
PIVOT Row into column Month
SELECT * FROM(SELECT FYear,[State],StateCode,LOBName,LOBCode,ProductName,ProductCode,RegionName,RegionCode,[FMonth],Membership
FROM #temp )t PIVOT (SUM(Membership)
FOR [FMonth] IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12] )) AS pvt
No comments:
Post a Comment