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: How to create temporary tables in PL/SQL program..

Re: How to create temporary tables in PL/SQL program..

From: Lando <MarkL_at_quebim.com>
Date: 1997/12/04
Message-ID: <34874087.9B74A988@quebim.com>#1/1

To create a temporary table in memory look at using a pl/sql table of records. To get your output to a file you have a few of choices: 1) create a database table, insert your pl/sql results into that table and spool the output to a file using sqlplus; 2) use the package utl_file to write your output directly to a file on the server from pl/sql; 3) create a database pipe and send the results through the pipe to program running on the server listening to the other end of the pipe which in turn would write the results to a file. The first choice is probably the easiest.

M.Landa

kgrigg_at_acxiom.com wrote:

> Hello all! I am experimenting in writing some PL/SQL and am a bit
> stuck
> on the direction I should take. Basically, I have a cursor that is a
> select statement and I am using a cursor loop to access each row.
> What I
> need to do, is gather data from each row, manipulate some of it,
> change
> some of it and generate output from it based on values on each row. I
> am
> then wanting to spool off the results to files...I will need to have a
>
> comma delimited one and a fixed fielded one.
>
> I was thinking I should approach this by using the cursor loop and
> doinh
> my manipulations for each row and insert these results into a
> temporary
> table and do a select on it to spool off to my files.
>
> My question is this, is there a way to create a temp table in memory
> for
> my results or do I have to do a create table command, use it, and then
>
> drop it?
>
> Any advice or suggestions on where to look for info greatly
> appreciated.
> I can't seem to find the answer in the books I have here.
>
> TIA!!
>
> Kelly
> kgrigg_at_acxiom.com
>
> ps. Please cc by mail too...our newsfeed here is STILL not
> reliable... :(
>
> -------------------==== Posted via Deja News
> ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Received on Thu Dec 04 1997 - 00:00:00 CST

Original text of this message

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