07-31-2023, 09:30 AM
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
Many thanks in advance.
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
[To see links please register here]
)?Many thanks in advance.