Is there a simple way to write the returned rows of a select statement to a file?

I have found one example where you can write a string to a file in SQL (http://www.simple-talk.com/code/WorkingWithFiles/spWriteStringTofile.txt), but the string max length is 8000 characters, and the table may be larger than that.

link|improve this question
What database system are you working with? – squillman Oct 10 '11 at 15:18
His example looks like MS SQL Server... – RobW Oct 10 '11 at 15:56
I am using SQL Server 2008 – John Oct 11 '11 at 12:50
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.