Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

flatteing a column value with multiple rows

user13168644Apr 2 2024

Hi,

I have a table with two columns. column one stores the id and column two stores multiple values with coma ( , ) separation.

I want to read each value as a separate row.

with table1 as

select 1 id, 'us, can,mex' codes from dual

union all

select 2 id, 'fr,gr,uk,de' codes from dual;

the output should be

1, us

1, can

1,mex

2, fr

2, gr

2,uk

2,de

Thanks

This post has been answered by Frank Kulash on Apr 2 2024
Jump to Answer
Comments
Post Details
Added on Apr 2 2024
4 comments
120 views