如何将表格从这种格式转换为另一种格式:
如何使用 T-SQL 转换到此格式?
Id | Data |Section
------------------------------------------
1 |1AAA |AAA
------------------------------------------
1 |1BBB |BBB
------------------------------------------
1 |1CCC |CCC
------------------------------------------
2 |2AAA |AAA
------------------------------------------
2 |2BBB |BBB
------------------------------------------
2 |2CCC |CCC
------------------------------------------
3 |3AAA |AAA
------------------------------------------
3 |3CCC |CCC
------------------------------------------
如何使用 T-SQL 转换到此格式?
Id |Column_AAA|Column_BBB|Colunm_CCC|
-------------------------------------
1 |1AAA |1BBB |1CCC |
-------------------------------------
2 |2AAA |2BBB |2CCC |
-------------------------------------
3 |3AAA |..... |3CCC |