Prueba estos métodos.
Esto obtiene el primer elemento como lo solicitó originalmente:
SQL> with tbl(str) as (
select 'Hello My Delimiter World' from dual
)
SELECT REGEXP_SUBSTR( str ,'(.*?)( My Delimiter |$)', 1, 1, NULL, 1 ) AS element
FROM tbl;
ELEME
-----
Hello
Esta versión analiza toda la cadena. Elementos NULL agregados para mostrar que funciona con elementos faltantes:
SQL> with tbl(str) as (
select ' My Delimiter Hello My Delimiter World My Delimiter My Delimiter test My Delimiter ' from dual
)
SELECT LEVEL AS element,
REGEXP_SUBSTR( str ,'(.*?)( My Delimiter |$)', 1, LEVEL, NULL, 1 ) AS element_value
FROM tbl
CONNECT BY LEVEL <= regexp_count(str, ' My Delimiter ')+1;
ELEMENT ELEMENT_VALUE
---------- --------------------
1
2 Hello
3 World
4
5 test
6
6 rows selected.