September 24, 2008 at 11:49 am
I swear I thought I either read about this or had seen it implemented but darned if I can find it now. I often take the results from a query in SSMS (done to the Grid output) and dump them into Excel for sorting operations so I don't bogg down my server just to sort the data a different way. One of the annoyances is with not being able to copy and paste the column headers or column names when I copy the results.
Is there any way in SSMS to have the first row in the result set contain the column names or column aliases when the output format is Grid?
Thanks
Kindest Regards,
Just say No to Facebook!September 24, 2008 at 11:58 am
You can do this 2 ways. The first way will make it apply to all query windows.
2. In SSMS with a query window open go to Query -> Query Options then to Results> Grid and check "include column headers when copying or saving results".
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
September 24, 2008 at 11:58 am
yep it sure does: Tools>>Options
Lowell
September 24, 2008 at 11:59 am
YSLGuru (9/24/2008)
I swear I thought I either read about this or had seen it implemented but darned if I can find it now. I often take the results from a query in SSMS (done to the Grid output) and dump them into Excel for sorting operations so I don't bogg down my server just to sort the data a different way. One of the annoyances is with not being able to copy and paste the column headers or column names when I copy the results.Is there any way in SSMS to have the first row in the result set contain the column names or column aliases when the output format is Grid?
Thanks
In the top menu go to Tools then options. In the window that opens go to the tree control on the left side. Pres on “Query Results” then “SQL Server” and “Reslts to Grid”. On the right side of the window check the checkbox – “Include column headers when copying or saving the results”
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
September 24, 2008 at 12:01 pm
Ahhh, I was first by seconds. Probably because I didn't provide the screen shot.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
September 24, 2008 at 12:05 pm
your too fast for me...once a path gets too many levels deep, i like screenshots too.
Lowell
September 24, 2008 at 12:16 pm
Yeah, I like screen shots too, but the OP sounded capable enough to find it without the screen shot. Usually if I'm wrong I do screen shots in post #2.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
September 24, 2008 at 12:42 pm
Big thanks to all! I knew I remembered seeing it somewhere.
Kindest Regards,
Just say No to Facebook!Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply