I needed to query my results to a text file. Using xp_cmdshell i was able to accomplish it very quickly.
EXEC master..xp_cmdshell’bcp “SELECT * FROM yourdatabase.dbo.yourtable” queryout “c:\test.sql” -c -T -x’
I needed to query my results to a text file. Using xp_cmdshell i was able to accomplish it very quickly.
EXEC master..xp_cmdshell’bcp “SELECT * FROM yourdatabase.dbo.yourtable” queryout “c:\test.sql” -c -T -x’