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!

Pivot Query: Transposing entire row of data into a single column.

user_snehaSep 21 2012 — edited Sep 24 2012
Hi,

My requirement is to transpose the data of each row into a single column. Below is a sample set of data.

Table A:

Column_1 Column_2 Column_3
A 212 East
B 15 West
C 24 East
D 546 North
E 311 South

Required output:

Column_1 A B C D E
Column_2 212 15 24 546 311
Column_3 East West East North South

I am aware of the sum decode function used for pivoting. I tried combining dynamic sql and sum decode .but that didn't work out. Can anyone please suggest the approach that I should take to achieve the desired output?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2012
Added on Sep 21 2012
17 comments
2,205 views