Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Save Query Output to a File?
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
![]() |
![]() |