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 -> Re: FORALL and BULK COLLECT INTO together in SELECT statements

Re: FORALL and BULK COLLECT INTO together in SELECT statements

From: Jack Addington <jaddington_at_shaw.ca>
Date: Mon, 17 Oct 2005 17:12:33 GMT
Message-ID: <5YQ4f.218174$1i.161555@pd7tw2no>


I don't know if it is supported in 8.1.7 but in 9.2 I can write this as

SELECT dnis_info_pk
BULK COLLECT INTO dnis_info_pk_list
FROM dnis_info
WHERE
dnis_number IN (select column_value from table(cast(dnis_number_list as DnisNumberList)) AND
start_time IN (select column_value from table(cast(start_time_list as DateList)) AND
end_time IN (select column_value from table(cast(end_time_list as DateList));

<psrao79_at_yahoo.com> wrote in message
news:1129557947.639168.266500_at_z14g2000cwz.googlegroups.com...
> Hi,
>
> My requirement is this:
>
> PROCEDURE replace_dnis_list (
> user_name IN user_account.user_name%TYPE,
> dnis_number_list IN DnisNumberList,
> start_time_list IN DateList,
> end_time_list IN DateList,
> dnis_info_pk_list OUT NumberList );
>
> I have three nested tables sent to me as parameters. They also form
> the selection criteria in the WHERE condition.
>
> That is, dnis_number_list(i), start_time_list(i) and end_time_list(i)
> uniquely identify one row in dni_info table.
>
> Now, I want to select the primary keys of those rows and send it to
> another procedure once again as a Nested Table to be stored in an
> actual Oracle table.
>
> I am using Oracle 8.1.7
>
> Thanks
>
Received on Mon Oct 17 2005 - 12:12:33 CDT

Original text of this message

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