Is there such a command as Spool in Oracle for SQL Server? I would like to select items and save them to a text file.
Thanks,
JazzBass
Printable View
Is there such a command as Spool in Oracle for SQL Server? I would like to select items and save them to a text file.
Thanks,
JazzBass
It's a bit messy - you need to use bcp & xp_cmdshell
Take a look here:
http://www.sqlmag.com/forums/message...&threadid=8780
Pete,
Thanks. You're right; it is messy. Looks like it'll work.
JazzBass
You could probably also use DTS which would be a little more elegant.
Pete,
Thanks for that. Do you have any idea how to implement this?
Thanks,
JazzBass
Unfortunately, I don't have SQL Server at work, and I can't really remember the steps...
...but you should be able to use one of the many wizards in SQL Server (Import/Export rings a bell) and save it as a DTS package. Then you can either reuse this package over and over, or have a poke around through the DTS UI to see how it works and how to customise it.
Thanks Pete. I'll see what I can find.
Take care,
JazzBass