Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to store output of Select statement in a file?
vipina_at_medconnect.com wrote:
> Hi All!
>
> How can I store the output of an SQL statement in a file?
> Eg.
> SQL> Select * from emp;
>
> Will show me all the contents of emp table instead/Simultaneously I want to
> store it in some file say output.txt
>
> Your views will be greatly appreciated.
>
> Thanks
> Vipin
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
Vipin,
try to use the following in SQL Plus:
set pagesize 0
set termout off
set feedback off
set timing off
spool emp.txt
select * from emp;
spool off
HTH,
-- Dietmar Leibecke debis Systemhaus GmbH ---------------------------- Opinions are mine and do not necessarily reflect those of my employerReceived on Wed Mar 04 1998 - 00:00:00 CST