I have a string in Oracle database, my string is: 'bbb;aaa;qqq;ccc'
I used regexp for split my string:
select distinct trim(regexp_substr('bbb;aaa;qqq;ccc','[^;]+', 1,level) ) as q
from dual
connect by regexp_substr('bbb;aaa;qqq;ccc', '[^;]+', 1, level) is not null ;
I want to split it in order, I expected the below output always:
bbb
aaa
qqq
ccc
because order of the subString are very important for me. but the result of this query is not in order:
qqq
aaa
bbb
ccc