Hi I need split text in Oracle SQL,
Input and output shown in picture. In first secture I have orginal data in one column ( in picture A column). In second secture which I need to return back(output).
my query is :
select val,
CASE
when substr(val, 1, instr(val, '/') - 1) is null then val
ELSE substr(val, 1, instr(val, '/') - 1)
end as "LEVEL1",
substr(VAL,
instr(val, '/',1)+1,
instr(val, '/',1,2)-instr(val, '/',1)-1) "LEVEL2",
substr(VAL, instr(val, '/') ) "aparat3"
from rmtd1.split_row;

regexp_substr(input,'[^/]',1),with your desired/. If you find a problem with using the example, feel free to update the question describing what the problem is.