How can I export data to csv format in SQL Server 2005?

The easiest way to do this would be to use the SQLCMD command-line utility to export a query or query file result set, changing the column separator value to a comma.

SQLCMD -S MyInstance -E -d sales -i query_file.sql -o output_file.csv -s ,

Look at the hyperlink listed above for more SQLCMD options that can make automating many of your everyday tasks simple.

Related Wiki Articles on Exporting Data