Include Column Headers From SSMS

  • Comments posted to this topic are about the item Include Column Headers From SSMS

  • After switching to SSMS I worked my way through all the options and found this tip a short time ago. But the only thing I really miss is that in QA I got a message for each Insert/Update/Delete of how many rows are/were affected.

    I couldn't find an option or configuration help how to get this back. Seems to be lost in SSMS.

    Anyone an idea?

  • Thank you for this Top Tip. It's been secretly annoying me for ages not taking the column headers across.

    Nice one 🙂

  • This doesn't work for me. I have SS2005, but I'm still not getting those pesky headers...

  • Which service pack are you running?

    --Jeff Moden

    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thank you, thank you, THANK YOU!

    We run a lot of ad-hoc queries for a group of users, and send the results back in Excel spreadsheets - this help immensely.

    Here there be dragons...,

    Steph Brown

  • I have found that column headers behave differently when writing a query from scratch (new query) versus opening a table. When I "open" a table with a right click, I cannot get column headers even with the option set. When I use "New query" the setting works.

    When opening a table the Query Designer toolbar is active, enabling "Change Type", "Verify SQL Syntax", etc. In this mode the column headers do not copy even when the option is set correctly.

    When using "New Query", the Query Designer toolbar is not active and the column header copies when the option is set.

    Another observation. In SQL 2000, the grid lines would copy when pasting to Outlook. Now I have to paste into Excel and turn on grid lines to get lines when pasting. Anyone found a better way? 😉

  • How do you setup this functionality in Enterprise Manager?

  • Thanks for a good tip.......:)

  • I'm using SP2 and my screen has an extra tick box, 'Quote strings contain list separators when saving .csv results' under Results to Grid.

    Anyway, it now works! Thanks.

  • HI,

    There is other alternative available for this header option

    You can get this option by selecting these options

    Query -> Query Options ->Results -> and then select the option of Include column headers when copying or saving the results


    Shashi Kant Chauhan 😎

  • seiiv (6/13/2008)

    How do you setup this functionality in Enterprise Manager?

    In Enterprise Manager I have not been able to copy column headers in Query Analyzer. Instead I create and run the query in the "View Designer", then use shift and arrow keys to highlight all the columns, then copy and paste. Do not need to save as a view, just use its query builder. 😎

  • In Enterprise Manager you have to highlight the column header by clicking the cell header.

  • Great tips thanks. I never knew that option existed.

  • WooHoo!!!:w00t::w00t:

Viewing 15 posts - 1 through 15 (of 18 total)

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