Monday, 29 July 2024

How to Split CLOB column data into different rows - SQL PL SQL - Oracle

  SELECT DISTINCT

        PROJECT_NAME_ALIAS,

        USER_EMAIL,

        REGEXP_SUBSTR(MODULE_NAME, '[^:]+', 1, LEVEL) AS MODULE_NAME,

        LEVEL

    FROM 

        XXUSER_PROJECTS_MODULES

    WHERE 

       PROJECT_NAME_ALIAS like 'A%'

            CONNECT BY 

        REGEXP_SUBSTR(MODULE_NAME, '[^:]+', 1, LEVEL) IS NOT NULL

        AND PRIOR SYS_GUID() IS NOT NULL


        select * from XXUSER_PROJECTS_MODULES

        where project_name_alias like 'A%'


if modules are stored as below 


No comments:

Post a Comment