DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: "In" Operator and Arrays

  1. #1
    Join Date
    Feb 2001
    Posts
    1

    Exclamation

    Hi,

    How can i use an Array or Nested Table in an IN Operator like:

    Example: Package

    Type T_StringArray is Table of Varchar2(20) index by binary_integer;
    or:
    Type T_StringArray is Varray(50) of Varchar2(20);

    procedure P_ProbeArray(Arr in T_StringArray) is
    NR Varchar2(20);
    Begin

    Select Count(CUST_PAY) Into NR From CUSTOMER Where CUST_NAME in (ARRAY);


    Thanks for Supporting me !!!

  2. #2
    Join Date
    Aug 2000
    Location
    Ny
    Posts
    105
    procedure P_ProbeArray(Arr in T_StringArray) is
    NR Varchar2(20);
    CURSOR c1(var varchar2) is SELECT COUNT(cust_pay) ccount
    FROM CUSTOMER
    WHERE cust_name = var;
    Begin

    for I .. arr.count
    loop
    for cc1 in c1(arr(i))
    loop
    NR = cc1.ccount;
    end loop;
    end loop;

    end;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width