Sunday, March 25, 2012

Exporting Data to File using TSQL

Does anyone know of a way to do this without using DTS? Simply by
SELECT * FROM <table>John,
Something like this:
EXEC master..xp_cmdshell 'osql -E -dPubs -Q"select * from
authors" -o"C:\authors.txt"'
or BCP (OUT)
HTH
Jerry
"John Barr" <JohnBarr@.discussions.microsoft.com> wrote in message
news:4E489E6F-2CE8-416B-AAF3-A73349B7092C@.microsoft.com...
> Does anyone know of a way to do this without using DTS? Simply by
> SELECT * FROM <table>
>

No comments:

Post a Comment