SQL server Pivot on Multiple Columns

前端 未结 3 1424
失恋的感觉
失恋的感觉 2021-01-02 07:33

I am trying to pivot on multiple columns. I am using SQL server 2008. Here is what I have tried so far

CREATE TABLE #t ( id int, Rscd varchar(10),Accd varcha         


        
3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-02 07:58

    Dont Use the ID Column. Use a derived table to retrieve all columns except the ID and then use the PIVOT table.

提交回复
热议问题