If you have | concatenated string to Rows.
Input: 123|456|789
SELECT REGEXP_SUBSTR (P_items,
'[^|]+',
1,
LEVEL)
Item_name
FROM DUAL
CONNECT BY REGEXP_SUBSTR (
P_items,
'[^|]+',
1,
LEVEL)
IS NOT NULL;
output:
123
456
789
Ex2:
Input: 123*456*789
SELECT REGEXP_SUBSTR (P_items,
'[^*]+',
1,
LEVEL)
Item_name
FROM DUAL
CONNECT BY REGEXP_SUBSTR (
P_items,
'[^*]+',
1,
LEVEL)
IS NOT NULL;
output:
123
456
789
No comments:
Post a Comment