How to export SQL Server 2005 query to CSV -
I want to export some SQL Server 2005 data to CSV format (separated by commas with commas). I can think of many complex ways to do this, but I want to do it right way. I have seen the BCP, but I can not understand how quotes (except by adding the values of the field) around the fields, which are ugly). I think I can do it with sqlcmd and -o, but it looks ugly for the same reason.
Is there a BCP way to do this?
Is there a proper sqlcmd method
Itemprop = "text">
In the management studio, select the database, right-click and select Work-> Export Data . There you will see options to export in a variety of formats, including CSV, Excel, etc.
You can also run your query from the query window and save the result in CSV.
Comments
Post a Comment