Home » SQL & PL/SQL » SQL & PL/SQL » Query output to file
Query output to file [message #39924] Fri, 23 August 2002 23:08 Go to next message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi,
I need to put the query results into a file.
Give me the simplest way of doing it.In UTL_FILE we can do by line by line so we have to use cursor.
But i dont want like this.

IN SQL server,the BCP works with query right..i need similar thing in oracle...can anyone help me with syntax....i dont know about SQL LOAD .....

Thanks and Regards
Victoria
Re: Query output to file [message #39927 is a reply to message #39924] Sat, 24 August 2002 08:38 Go to previous message
Madhu
Messages: 36
Registered: April 2001
Member
IF u are talking about SQL*PLUS

do it this way
SQL > spool <filename>
SQL > <execute your Query>
SQL > Spool off <after the Query is completed>

The output is directed to the filename u have given
Previous Topic: Re: can't install oracle 8i on 2000 o/s
Next Topic: Interesting questions
Goto Forum:
  


Current Time: Thu Apr 18 00:26:26 CDT 2024