Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Bulk Collect into Associative Array question

Bulk Collect into Associative Array question

From: Jack Addington <jaddington_at_shaw.ca>
Date: Tue, 19 Apr 2005 23:57:33 GMT
Message-ID: <NVg9e.1073664$Xk.202211@pd7tw3no>


I have an associative array full of primary keys from a table. I need to populate two other arrays with other column data from the same table. Is there a bulk collect syntax I can use that uses my existing array of keys?

I have it working using the following:

for idx in atbl_field.first .. atbl_field.last loop

   select f.field_short_name,

            f.field_value_type
   into ltbl_field_name(idx), ltbl_field_type(idx)    from epm_field f
   where f.field_id = atbl_field(idx);

but that means x trips to the server.

I was looking for something along the lines of

select x,y
bulk collect into tx, ty
from table
where field in tkeys

Since I can't use forall with a select statement what else could I do? I don't really want to do a fake update statement with returning bulk into ...

thx

jack Received on Tue Apr 19 2005 - 18:57:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US