How to save sql query result to succeed?

How to save the result of a SQL query from SQL Server 2008 R2 to Microsoft Excel 2008?

+4
source share
1 answer

The manual way, if in SQL Server Management Studio (SSMS) you simply select rows and columns and paste it into Excel, or you can right-click and save as a CSV file and open it in Excel.

To get the headers you want:

  • Select the Service option.
  • Click OptionsQuery ResultsSql ServerResults for Grid
  • Tick Include column headers when copying or saving results.

Then make your copy and paste.

+9
source

All Articles