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!

convert columns into rows.

924529Apr 26 2012 — edited Apr 26 2012
Hi All,

I need a logic for to convert columns into rows. I have multiple columns they will as one row. I'm giving the sample data below. Is there any can we do this using unpivot or any other analytical function. Please help me out.
SELECT 'FRANCE' ,'USA','UK','FR100' FRAN_CODE,'102020' US_OCDE,'2032' US_CODE FROM DUAL;

COUNTRY CODE
======= ====
FRANCE  FR100
USA      102020
UK        2032
Thanks a lot.

Regards,
Ramana.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2012
Added on Apr 26 2012
11 comments
15,050 views