convert one row into columns

后端 未结 2 857
一个人的身影
一个人的身影 2021-01-20 17:14

This is my query. That show me results as described in the screen shot. Now i want to change it so it show me statues of the month in columns.

DECLARE @temp          


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-20 17:45

    You can make use of dynamic PIVOT approach shown in this post http://beyondrelational.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspx

提交回复
热议问题