1
我有一個表甲骨文行至列轉換
select * from table
值返回被
login id | status_name | count
===============================
admin | open | 3
admin | closed | 5
test | inprogress | 10
test | open | 10
test | closed | 11
user1 | closed | 5
user1 | pending | 10
如何從行轉移該數據列? 我想以這種方式
login_id | open | closed | inprogress | pending
================================================
admin | 3 | 5 | 0 | 0
test | 10 | 10 | 10 | 0
user1 | 0 | 5 | 0 | 10
嘗試尋找到PIVOT還有:如http://stackoverflow.com/questions/4841718/oracle-sql-pivot-query – tbone 2012-03-06 12:12:43