|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, June 04, 2013 9:01 AM
Points: 25,
Visits: 102
|
|
There is an easier answer (perhaps the capability was added in a later Service Pack)
In Management Studio select Tools Options/Query Results/SQL Server/Results to Grid and check the Include Columns Headers when copying or saving results. These settings apply when you open a new QA tab.
To select the whole results set click on the top left corner for the grid (above the row number and left of the column headings) right click and copy to the clipboard. Paste into a cell in Ecxel and you will get the headers.
Robin
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, May 14, 2008 3:43 AM
Points: 37,
Visits: 12
|
|
Robin,
This may work in Management Studio (SQL 2005) but this features is not available in SQL Query Analyzer (from SQL 2000).
The clue's in the title of this thread! ;)
Adam
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, June 04, 2013 9:01 AM
Points: 25,
Visits: 102
|
|
LOL, thanks for pointing that out. I still think of the Query tab as the Query Analyzer. My search was for 2005 and I did not look at the tags for the thread. Robin
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, April 15, 2008 8:50 PM
Points: 1,
Visits: 5
|
|
Very Helpful!!!! I switch between the Results Output Format often and have grown tired of clicking my way through the process.
Now If only there was a way to toggle between the different Results Output Format without going through the Options window, similar to CTRL+T, CTRL+D,CTRL+F for the results target format....Is there?
If you know how, please share.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, October 15, 2009 5:16 PM
Points: 2,
Visits: 0
|
|
If anyone is interested, I've created an SSMS 2005/2008 Addin that allows saving SQL query results as an XLS file, with header and value formats intact. You don't have to mess around with copying and pasting to import CSV.
http://www.SsmsXlsExport.com/
Cheers, David SsmsXlsExport.com
|
|
|
|