Skip to Main Content

SQL & PL/SQL

Announcement

Testing banner

How to convert comma seperated values from multiple colums.

SHAJ_SHAJINDec 18 2022

Hi All,
How to convert comma seperated values from multiple colums.
I have used this query to convert a single column and not sure how to do this for multiple columns.
select regexp_substr (ITEM_NO,'[^,]+', 1, level ) ITEM_NO from dummy connect by level <= length ( ITEM_NO ) - length ( replace ( ITEM_NO, ',' ) ) + 1;
ITEM_NO QTY Price
77,78,361,362,366 43,43,44,33,26 86,43,8800,8250,5096
desired output:
ITEM_NO QTY price
77 43 86
78 43 43
361 44 8800
362 33 8250
366 26 5096

This post has been answered by cormaco on Dec 18 2022
Jump to Answer
Comments
Post Details
Added on Dec 18 2022
7 comments
88 views