I have an array of strings. I want to check if a particular string is present in the array.
DECLARE
TYPE v_array IS TABLE OF VARCHAR2(200);
ais_array v_array;
BEGIN
ais_array := ('Lb1','Lb2','Lb3','Lb613');
IF 'Lb1' IN ais_array THEN
dbms_output.put_line('found');
END IF;
END;
The IN
operator is not working. I tried doing a select *
on the type and then using IN
but that didn't work either.
Any suggestions?
v_array
is a bad name for a nested table type. It could confuse a stupid person. – Warthman