Hi,
I am using a APEX_APPLICATION_GLOBAL.VC_ARR in a function but having trouble using the MEMBER OF in the code:
PLS-00306: wrong number or types of arguments in call to 'MEMBER
OF'
While error is self explanatory, I am not sure why MEMBER OF would not work as I am looping through a table of varchar2?
Using Apex 4.2.2 and Oracle 11gR2
My function is below:
FUNCTION array_match(p_string1 IN VARCHAR2, p_string2 in varchar2)
RETURN NUMBER
is
string_t1 APEX_APPLICATION_GLOBAL.VC_ARR2;
string_t2 APEX_APPLICATION_GLOBAL.VC_ARR2;
begin
string_t1 := APEX_UTIL.STRING_TO_TABLE(p_string1);
string_t2 := APEX_UTIL.STRING_TO_TABLE(p_string2);
if string_t2.count = 0 OR string_t2.count = 0 then
return 0;
end if;
for idx in string_t2.FIRST..string_t2.LAST LOOP
IF string_t2(idx) NOT MEMBER OF string_t1 THEN
RETURN 0;
END IF;
END LOOP;
RETURN 1;
end array_match;
Thanks.