Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using APEX_APPLICATION_GLOBAL.VC_ARR2

xarg-XrcFeb 20 2014 — edited Feb 21 2014

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.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2014
Added on Feb 20 2014
3 comments
1,569 views