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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL: select into local table variable

Re: PL/SQL: select into local table variable

From: Ralf Jonas <ralf.jonas_at_gmx.de>
Date: Thu, 15 Nov 2001 08:43:05 +0100
Message-ID: <9svrns$162r7e$1@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 - 01:43:05 CST

Original text of this message

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