Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL: select into local table variable
Both the PL/SQL table and the database table would have to use the same
object type. You will still be specifying a single database table column in
your bulk collect statement. There is an example in the PL/SQL
documentation.
"Ralf Jonas" <ralf.jonas_at_gmx.de> wrote in message
news:9svrns$162r7e$1_at_ID-6634.news.dfncis.de...
> Hi Brian,
>
> > You can't bulk collect into a table of records. Try using a two tables
> > instead.
> >
> > create or replace procedure test as
> > type tIDTabelle is table of ptvpln.id%type index by binary_integer;
> > NewIdTab tIDTabelle;
> > OldIdTab tIDTabelle;
> > begin
> > NewIdTab.Delete;
> > OldIdTab.Delete;
> > select id, old_id bulk collect into NewIdTab, OldIdTab from ptvpln
> > where...;
> > end test;
>
> yes, this seems to be the only way. If I read the manuals correctly,
> there should be a way using tables of type object instead of type record
> to perform this task. But I can't figure out how to do.
>
> Any hints?
> Ralf
Received on Thu Nov 15 2001 - 07:39:09 CST
![]() |
![]() |