Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Bulk Collect into Associative Array question
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