views:

45

answers:

1

How to export query result to .csv file in SQL Server 2008 ?

Thanks in advance

+2  A: 
  1. Open SQL Server Management Studio
  2. Go to Tools > Options > Query Results > Results To Text
  3. On the far right, there is a drop down box called Output Format
  4. Choose Comma Delimited and click OK

See a screenshot

This will show your query results as comma-delimited text.

To save the results of a query to a file: Ctrl + Shift + F

8kb

related questions