Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> How to define a Type with multiple columns ,for bulk fetch
Hi sorry another question more, how can I define a type with TWO OR MORE
columns
to bulk fetch in this way
DECLARE
TYPE TEST IS TABLE OF VARCHAR2(20);
TEST1 test;
i number := 0;
cursor c is SELECT LQF_CUENTA FROM CTALIQFON;
BEGIN
open c;
loop
fetch c bulk collect into test1;
for i in 1..test1.count loop
dbms_output.put_line(test1(i));
end loop;
exit when c%notfound;
end loop;
For one column I can do this
TYPE TEST IS TABLE OF VARCHAR2(20);
If I use a table I can do this
TABLA TYPE TEST IS TABLE LATABLA%ROWTYPE;
Now if I do something like
TYPE tLiq IS RECORD (
CTS_CUENTA VARCHAR2(20), CTS_MONEDA VARCHAR2(3));
fetch c bulk collect into tLiq, gives error. pls-00403
Thanks
![]() |
![]() |