Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unknown number of rows to columns

590229Sep 9 2008 — edited Sep 9 2008
Hi, I need to convert rows to columns.

I have table with one column in it with unknown number of rows and in the result set I would like to get same number of columns.
For example:
Table TEST with column COL1, number of rows unknown

COL1
row1
row2
row3
...
rowN

Result set should look like this:

COL1 COL2 COL3 ... COLN
row1 row2 row3 ... rowN
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2008
Added on Sep 9 2008
9 comments
366 views