How to handle NULL collection (Type Table )
443808Sep 8 2005 — edited Sep 9 2005Procedure ABC(p_in_tab_name IN tab_name)
IS
BEGIN
FOR l_count IN p_in_tab_name.FIRST..p_in_tab_name.LAST
LOOP
--process each records
END LOOP;
END ID;
here p_in_tab_name is Table Type of VARCHAR2 and can be NULL.
If I execute this procedure like:
ABC(p_in_tab_name => NULL);
I get exception - ORA-06531: Reference to uninitialized collection
Pls advice how should I can handle this case.