Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export from SQL Server 2012 to .CSV through Management Studio

I have a SQL Server 2012 database that I am trying to export to .CSV. My knowledge of SQL is very basic and my question is, I'm assuming it would be done in Management Studio, how do I do this?

like image 537
Webbly Brown Avatar asked Jul 04 '13 13:07

Webbly Brown


People also ask

How do I export a CSV file from SQL Server Management Studio?

To proceed, follow the below-mentioned steps: Step 1: First of all, start SQL Server Management Studio and connect to the database. Step 2: Next, under Object Explorer search for the database you want to export data in CSV. Step 3: Right-click on the desired database >> go to Tasks >> Export Data.

How do I create a CSV file in SQL Server 2012?

Export SQL Server data to CSV by using the bcp Utility. Export SQL Server data to CSV by using SQL Server Reporting Services (SSRS) in SQL Server Data Tools (SSDT) within Visual Studio. Export SQL Server data to CSV by using the ApexSQL Complete Copy results as CSV option.


Video Answer


2 Answers

If it is the query results you want exported to csv, you can right click on the results grid and select "Save Results As", which will allow you to save as csv.

like image 148
Nick Howard Avatar answered Oct 04 '22 18:10

Nick Howard


Right click on your database in management studio and choose Tasks -> Export Data...

Follow a wizard, and in destination part choose 'Flat File Destination'. Type your file name and choose your options.

like image 40
Nenad Zivkovic Avatar answered Oct 04 '22 20:10

Nenad Zivkovic