Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Trouble with SQL output to a file Expand / Collapse
Author
Message
Posted Tuesday, October 21, 2008 1:37 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, November 6, 2008 3:30 PM
Points: 15, Visits: 24
Having trouble with directing SQL output sent to a file from command line as well as batch file in SQL 2000.

Code:

osql -S -o <outputfile.csv


In the output file I dont see the statements executed.

Where am I missing?


Thanks for your time!
Post #589419
Posted Tuesday, October 21, 2008 1:55 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, March 14, 2014 3:15 PM
Points: 804, Visits: 935
Do not post a new topic, you could just put a new reply as an updated script you need to be helped out with..my version is same again

OSQL.EXE /n /S "servername" /U login /P "pswd" /d DB Name /i "Input file pathl" /o "output file path"

Hope this helps

Thanks!!


The_SQL_DBA
MCTS

"Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."
Post #589426
Posted Tuesday, October 21, 2008 1:59 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:43 AM
Points: 6,178, Visits: 13,323
a little bit of de ja vue with this post me thinks

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #589431
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse