Comma-separated string to tabular format

 

Comma-separated string to tabular data

Sometimes we need to extract individual data from the comma-separated strings. We can use the following query to do that in oracle.


SELECT REGEXP_SUBSTR('my comma separated string', '[^,]', 1, LEVEL) TYPE, LEVEL

FROM DUAL

CONNECT BY LEVEL <= REGEXP_COUNT('my  comma separated string','[^,]') ;

Comments

Popular posts from this blog

Build shared library of ffmpeg with x264 to use in visual studio win32 project

How to Build WPF project with Setup file (Installer Project)

Trigger for Audit Trail in Oracle