nested table -- uninitialized collection error
403863Feb 23 2007 — edited Feb 23 2007Hello,
Here are the steps I followed,
a) create type idList is table of number;
b) CREATE OR REPLACE procedure exp_type (my_list out IdList)
is
i number := 1;
cursor c is
select val from exp_array;
begin
for rec in c
loop
i := i + 1;
my_list(i) := rec.val;
end loop;
end;
c) DECLARE
MY_LIST1 IdList;
BEGIN
EXP_TYPE ( MY_LIST1);
dbms_output.put_line('COUNT IS '||my_list1.count);
END;
Here I get ORA-06531: Reference to uninitialized collection error on the procedure.
Could you please let me know how to avoid this error ?
thank you,
Madhu