How to Use SQL Server Management Studio for Quick and Easy CSV Data Export

March 14, 2022
SQL Server Management Studio provides many ways to export data from a database. Here's one quick and easy way for CSV data exports.

By: Phillip Sharpless

 
The need to export data from a database to some other format is a pretty common scenario for many data professionals. SQL Server Management Studio provides several different ways to accomplish this, some more complicated than others.

If you’re working with large or more complicated exports, the various wizards provided in Management Studio are going to give you the flexibility and power you are most likely needing.

By right clicking a database, the Tasks submenu will provide a host of operations that includes the Generate Scripts and Export Data tasks. These features provide powerful wizards which can be used to manipulate data and database objects.
 

 
These wizards provide very robust and customizable ways to perform many different operations, but they also may be overkill for extremely small jobs.

You may just need to export some rows from a single table for example – a task I found myself recently in need of doing a few times.

Fortunately, I discovered a feature that was unbeknownst to me that made this process very simple and allowed me to avoid a lot of the option setup the task wizards demand.

Upon running a query, the results of the query are presented to you in the standard Results grid below. If you right click within the Results grid, you will see a Save Results As option. This will allow you to export whatever the query results were to a CSV or tab delimited file very quickly.
 

 
This easily overlooked feature definitely comes in handy when doing quick and simple data exports to common file formats.
 

Thanks for Reading! Questions?

Thanks for reading! We hope you found this blog post useful. Feel free to let us know if you have any questions about this article by simply leaving a comment below. We will reply as quickly as we can.
 

Keep Your Data Analytics Knowledge Sharp

Get fresh Key2 content and more delivered right to your inbox!
 

 
 

About Us

Key2 Consulting is a boutique data analytics consultancy that helps business leaders make better business decisions. We are a Microsoft Gold-Certified Partner and are located in Atlanta, Georgia. Learn more here.

Related Content
Rebuilding Indexes Based on Partition 

Rebuilding Indexes Based on Partition 

Author: Austin Dolezal Many businesses are wasting time and money cleaning up their data when small fixes and tweaks could optimize their processing time and storage space.  Database indexes and partitions are often created and forgotten about until there is an...

5 Key Takeaways From PASS Data Community Summit 2022

5 Key Takeaways From PASS Data Community Summit 2022

The PASS Data Community Summit 2022 was a blast! A handful of people from our company attend the conference every year and this year was no exception. The knowledge gained, connections made, and fun enjoyed in Seattle is always worth the investment. Here are our five...

How to Delete Data From a Large Partitioned Table

How to Delete Data From a Large Partitioned Table

By: Ken Adams   The Problem I recently ran across an issue on a project that required a large amount of data to be removed from a table, specifically an issue with the loading of the table causing duplication of data. All non-clustered indexes had been removed...