Include Column Headers From SSMS

  • KenSimmons

    SSCertifiable

    Points: 7822

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

  • Knut Boehnert

    SSCrazy

    Points: 2946

    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?

  • d trotman

    Valued Member

    Points: 58

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

    Nice one 🙂

  • Jon Spink

    SSCarpal Tunnel

    Points: 4010

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

  • Jeff Moden

    SSC Guru

    Points: 994858

    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.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. 😉

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

  • Stephanie J Brown

    Hall of Fame

    Points: 3866

    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

  • Russel Bell

    Old Hand

    Points: 305

    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? 😉

  • seiiv

    SSC Rookie

    Points: 25

    How do you setup this functionality in Enterprise Manager?

  • Anipaul

    SSC-Insane

    Points: 24681

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

  • Jon Spink

    SSCarpal Tunnel

    Points: 4010

    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.

  • shashi kant

    SSCommitted

    Points: 1659

    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

    Regards

    Shashi Kant Chauhan 😎

  • Russel Bell

    Old Hand

    Points: 305

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

  • KenSimmons

    SSCertifiable

    Points: 7822

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

  • Jacob Bennett

    SSC-Addicted

    Points: 470

    Great tips thanks. I never knew that option existed.

  • Alan Vogan

    SSCrazy

    Points: 2483

    WooHoo!!!:w00t::w00t:

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

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