Check whether a value present in PL/SQL table containing array of integers
666258Oct 30 2008 — edited Dec 2 2008Hi,
In my stored procedure i need to check whether a particular value present in PL/SQL table which consists of array of integers.
TYPE TBL_ARR IS TABLE OF NUMBER(2);
ARR TBL_ARR;
Now i need to check whether 2 is present in array ARR.
i have used MEMBER OF function to check this as below
IF(2 MEMBER OF ARR) THEN
Z:='Present';
but MEMBER OF function works only in 10g and not in the versions below 10g.
So please can anyone help me out in doing this. Is there any function to do this? I tried EXISTS of but it checks only the index and not the value.
Looping the entire PL/SQL table of array is the only option or is there any function to do this?
Thanks.