Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003
    Posts
    5

    Unanswered: Associative array

    I have a variable declared as this:
    type ltype_Queue is table of NUMBER index by binary_integer;
    l_Queue ltype_Queue;


    How can I accomplish the equivalent to this:

    select *
    from Items
    where ID in l_Queue


    Thanks,
    Layne

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Associative array

    Originally posted by lrobin3
    I have a variable declared as this:
    type ltype_Queue is table of NUMBER index by binary_integer;
    l_Queue ltype_Queue;


    How can I accomplish the equivalent to this:

    select *
    from Items
    where ID in l_Queue


    Thanks,
    Layne
    You can't do that with PL/SQL tables. You would have to create a permanent type with CREATE TYPE to do this. Then you can say:

    select *
    from Items
    where ID in
    ( select column_value from table( cast( l_queue as ltype_queue ) ) )

Posting Permissions

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