Does apex_string.split always guarantee that the order of the rows returned is the order of the characters of the string ? Can I rely on the rownum to always correspond to 1 for the first character of the split string ? or do I need to add a order by rownum ?
What is the method to get the rows in the same order of the characters of the string ?
My requirement is to insert the rows returned by apex_string.split in the same order as the characters of the string.
I am currently executing the below, will this maintain the character order ?
select t.column_value value, rownum seq
from table(apex_string.split('test','')) t
bulk collect into ins_arr;
for i in ins_arr.first..ins_arr.last
loop
/* execute insert statement */
insert into table (seq, value )
values (ins_arr.seq,ins_arr.value);
end loop
The insert should result in
| seq | value |
|---|---|
| 1 | t |
| 2 | e |
| 3 | s |
| 4 | t |
Thank you in advance,