• 30 Mar 2009 /  SQL, Work

    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’

    Posted by Jesse @ 1:53 pm

    Tags: ,

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.