Home » SQL & PL/SQL » SQL & PL/SQL » OUTPUT OF QUERY
OUTPUT OF QUERY [message #190111] Tue, 29 August 2006 05:19 Go to next message
javed122
Messages: 19
Registered: April 2005
Location: Mumbai
Junior Member
Hi All,

How to put output of SQL Query to text file
I am trying with
SELECT *
FROM t1;
OUTPUT TO c:\t1.txt
FORMAT ASCII

which gives me follwing error

SP2-0734: unknown command beginning "OUTPUT TO ..." - rest of line ignored.
Re: OUTPUT OF QUERY [message #190113 is a reply to message #190111] Tue, 29 August 2006 05:23 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
If you're using SQL*Plus, try SPOOL

I have to ask - where is the syntax you used from, and what made you think it would work?
Re: OUTPUT OF QUERY [message #190125 is a reply to message #190113] Tue, 29 August 2006 05:47 Go to previous messageGo to next message
javed122
Messages: 19
Registered: April 2005
Location: Mumbai
Junior Member
Thank you very much for your help

Actually i copied the command from one of website....
Re: OUTPUT OF QUERY [message #190156 is a reply to message #190113] Tue, 29 August 2006 07:58 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Google reveals that it seems to be sybase syntax. (so, I expect it to be SQLServer as well)
Previous Topic: interview question
Next Topic: regular expression problem
Goto Forum:
  


Current Time: Mon Dec 05 10:38:08 CST 2016

Total time taken to generate the page: 0.12837 seconds