The Best Kept Secret About SQL Query Analyzer

  • 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

  • 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

  • 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

  • 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.

  • 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

Viewing 5 posts - 91 through 94 (of 94 total)

You must be logged in to reply to this topic. Login to reply