将一列值拆分为多列

问题描述:

flano   PresentAmps
3   9
5   6
5   6
1   27
3   5
3   14





i希望像

1 3 5

27 9 6

5 6

5

14

基于第一列值,我希望将这些值拆分为第二列值作为标题,并将其作为标题'的数据。我可以在sql server中获取它。



i want the out put like
1 3 5
27 9 6
5 6
5
14
based on the first column values i want split that values as headers fallowed by second column values as header''s data.how can i get it in sql server.

阅读 MSDN [ ^ ] thread ...相似的问题也张贴在那里......
Read MSDN[^] thread... Similar question is also posted over there...