I am writing a piece of code that would need to iterate on the content of a string, each values being separated with a ,
.
e.g. I have my elements
v_list_pak_like varchar2(4000) := 'PEBO,PTGC,PTTL,PTOP,PTA';
How can I get it into an Array / Cursor to iterate on it in my loop?
for x in (elements)
loop
-- do my stuff
end loop;
I am looking for the very simple way, if possible avoiding to declare associative arrays.
Would it be possible to create a function that would return something usable as an input for a for
loop (opposite to the while that could be used like in https://stackoverflow.com/a/19184203/6019417)?
Many thanks in advance.