Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SYS.ODCIVARCHAR2LIST

956405Sep 11 2012 — edited Sep 11 2012
Hello,
I have a procedure that recieves a string and want to store this string in SYS.ODCIVARCHAR2LIST ();



declare
tes SYS.ODCIVARCHAR2LIST := SYS.ODCIVARCHAR2LIST ();
str varchar2(50);

begin
str:='(''a'',''b'',''c'')';
select * BULK COLLECT INTO tes from (select str from dual);


FOR INDX IN 1 .. tes.COUNT
LOOP
DBMS_OUTPUT.PUT_LINE (tes (indx));
END LOOP;

end;


the output is ('a','b','c')====> the whole string is getting stored in first index of the SYS.ODCIVARCHAR2LIST...I would like to have stored over 3 indexes..

desired output is
a
b
c

Thank you
This post has been answered by BrendanP on Sep 11 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2012
Added on Sep 11 2012
4 comments
30,464 views