Hi ,
Please help find the relevant function for a split sample records:
below script does not give output which want to receive.
with regexp as (
select '3000100015a7' str from dual union all
select '3000200220085' str from dual union all
select '71001003400246' str from dual union all
select '4000020000170050' str from dual
)
select str, regexp_substr(str, '[^00]+')regexp1,regexp_substr(str, '[^00]+', 1, 2)regexp2
from regexp
(00) my delimiter;I need only data for the beginning string split by two delimiter
Output should be like below:
30 00 10 00 15a7
30 00 2 00 220085
71 00 1 00 3400246
400 00 200 00 170050