Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL How to output to file - beginner
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