Wie die pivot-Tabelle mit T-SQL?

Wie Tabelle konvertieren von diesem format:

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
------------------------------------------

In diesem format mit T-sql ?

Id |Column_AAA|Column_BBB|Colunm_CCC|
-------------------------------------
1  |1AAA      |1BBB      |1CCC      |   
-------------------------------------
2  |2AAA      |2BBB      |2CCC      |       
-------------------------------------
3  |3AAA      |.....     |3CCC      |   
InformationsquelleAutor DevUser | 2012-03-22
Schreibe einen Kommentar