我的现有数据是
indust 200301 200302 200303
--------------------------------
a 111
a 555
a 999现在要转换成
indust 200301 200302 200303
--------------------------------
a 111 555 999
这个SQL语句怎么写呢谢谢!
indust 200301 200302 200303
--------------------------------
a 111
a 555
a 999现在要转换成
indust 200301 200302 200303
--------------------------------
a 111 555 999
这个SQL语句怎么写呢谢谢!
a 111
a 555
a 999
b 1321
c 5455
d 2424
d 432434这样的数据,你希望是什么结果?
http://topic.csdn.net/u/20080614/17/22e73f33-f071-46dc-b9bf-321204b1656f.html
indust 200301 200302 200303
--------------------------------
a 111
a 555
a 999
[200301]=max([200301]),
[200302]=max([200302]),
[200303]=max([200303])
From test
Group by indust