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!

Comma separated string to columns dynamically

as maMar 24 2025

Hi All,

I have a column containing comma separated values of different sizes and my requirement is to turn those into columns.

DB version 19c

I need a dynamic solution which can accept max 500 character string and turn it into columns.

select ‘1, 2, , 3’ from dual should show result as below

c1 c2 c3 c4

1 2 3

select ‘1, 2’ from dual should show result as below

c1 c2

1 2

This post has been answered by Stew Ashton on Mar 26 2025
Jump to Answer
Comments
Post Details
Added on Mar 24 2025
8 comments
455 views