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: Save Query Output to a File?

Re: Save Query Output to a File?

From: Grant Lee <leegr_at_cs.curtin.edu.au>
Date: Wed, 15 Apr 1998 19:30:29 +0800
Message-ID: <35349A55.C27C1CF1@cs.curtin.edu.au>


Joe Condle wrote:

> How can you save a SQL query to a file? I am running Oracle 8
> on a Sun Solaris machine. All I want to do as save the ouput of
> the select statement to a text file instead of having it scroll off
> the screen. I have searched through all the documentation.
>

Assuming you are using SQL*Plus for executing your query, you need to use the spool command...

   SQL> spool <output file name>
   SQL> select * from emp;
     ...
   SQL> spool off

any output that results from statements between spool and spool off will be
written to the file that you specified.

Hope this helps Received on Wed Apr 15 1998 - 06:30:29 CDT

Original text of this message

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