Doubt Regarding Collection Methods
AJ.MSep 1 2011 — edited Sep 5 2011Hello,
I am working on Oracle version 10g Release 2
I wanted to know that how can we find a particular name (person) exists in a Collection..
Below is my Code
--------------------------------------------------------------------
DECLARE
TYPE nested_tab IS TABLE OF VARCHAR2(100);
l_tab nested_tab := nested_tab();
BEGIN
SELECT e.ent_id BULK COLLECT INTO l_tab
FROM entity_master e
WHERE e.ent_id IN ('N002208', 'Z002011', 'V002313', 'X002011'..... & so on);
IF l_tab.EXISTS('N002208') THEN
dbms_output.put_line('element exists');
ELSE
dbms_output.put_line('NO element ');
END IF;
END;
/
ORA-06502 - Numeruc or Value Error
--------------------------------------------------------------------
what can be the work around for this...?