Skip to Main Content

SQL & PL/SQL

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!

WHERE xxx IN <collection> for BULK COLLECT possible???

XenofonOct 18 2010 — edited Oct 18 2010
Hi there,
i am trying to program a SELECT ... BULK COLLECT statement that uses a collection containing filter elements. Something like the following
CREATE TABLE t AS (id NUMBER(5), txt VARCHAR2(100));

DECLARE
  type t_t is table of t%rowtype;
  tt_t  t_t;
BEGIN
  SELECT *
  BULK COLLECT INTO tt_t
  FROM t
  WHERE id IN <some other formerly defined collection, which would be a table of the "id" data type (NUMBER(5))>
  ;
END;
Is that possible? What of collection can I do this with and which method am I to use? Feel free to cite Oracle PL/SQL documentation and even to use 11gR2 features.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2010
Added on Oct 18 2010
4 comments
316 views