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: Building temporary result set in PL/SQL

Re: Building temporary result set in PL/SQL

From: Pablo Sanchez <pablo_at_dev.null>
Date: Mon, 13 May 2002 05:51:02 -0600
Message-ID: <3cdfa712_14@news.teranews.com>

"Morten" <usenet_at_kikobu.com> wrote in message news:3CDF86DF.3060903_at_kikobu.com...
>
> Hi. Can someone point me in the right direction on how I
> programatically build a result set in PL/SQL? I could
> insert into a temporary table and select * from that,
> but can I not avoid the temporary table?
>
> I'm not quite sure what to look for in the documentation.
> In effect, what I'm looking for, is an alternative to the
> below routine, that does not use inserts, but returns the
> output relation.
>

Hi Morten,

What do you plan on doing with the 'temporary result set?' In Oracle, you typically aren't creating temporary tables ala Sybase/MS SQL. You can create a COLLECTION (see docs) in PL/SQL which can then be BULK INSERTED into the database - extremely efficient.

Think of COLLECTIONs as being an array - you have the option of creating associative arrays too which is very nice, especially if you plan on de-dup'ing data.

--
Pablo Sanchez, High-Performance Database Engineering
mailto:pablo_at_hpdbe.com
http://www.hpdbe.com
Available for short-term and long-term contracts
Received on Mon May 13 2002 - 06:51:02 CDT

Original text of this message

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