How to convert table from this 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
------------------------------------------
To this format with T-sql ?
Id |Column_AAA|Column_BBB|Colunm_CCC|
-------------------------------------
1 |1AAA |1BBB |1CCC |
-------------------------------------
2 |2AAA |2BBB |2CCC |
-------------------------------------
3 |3AAA |..... |3CCC |
this should give you the results you want.
Results: