將多列值轉換為一行顯示

likesky276發表於2007-01-17

Select Substr(Sys_Connect_By_Path(BRANCH_NO, ','), 2)
From (Select Rownum Rid, Rownum + 1 Next_Rid, BRANCH_NO
From branch_tab
WHERE SENIOR = '11011')
Where Rid = (Select Count(*)
From branch_tab
WHERE SENIOR = '11011')
Start With Rid = 1
Connect By Prior Next_Rid = Rid;


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8118583/viewspace-64840/,如需轉載,請註明出處,否則將追究法律責任。

相關文章