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: PL/SQL How to output to file - beginner

Re: PL/SQL How to output to file - beginner

From: Sylvain <sylvain_at_sdv.fr>
Date: 1997/12/02
Message-ID: <01bcff0e$ab052f40$2e6346c0@optimum.sdv.fr>#1/1

 Hello me! (???!)

 You cannot use PL/SQL to write to a file.  SQLPLUS does the job.
 In fact, the first "level" is SQL, the second IS PL/SQL (for Procedural Lang.) and then SQPLUS.
 What I would do is an "insert into table temp values(etc...);" (in PL/SQL).
 After the end of PL/SQL ("end;^M/"), you return to "SQLPLUS". Then, the command "spool OutFile.txt" makes the standard output duplicated to the file "OutFile.txt". Then, simply do something like "select * from temp", eventually "order by line". This will write into the file. To stop the redirection, use the "spool off" command.

 Hope it helps!

Me <akm_at_admin.cpp-db.com> a écrit dans l'article <65vpd0$soq_at_masters0.InterNex.Net>...
> I'm a beginner using PL/SQL and I can't figure out how to print
> output from the database to a file.
>
Received on Tue Dec 02 1997 - 00:00:00 CST

Original text of this message

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