Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
T-SQL (SS2K5)
»
Copying Headers from SQL Query Window results...
Copying Headers from SQL Query Window results in SQL 2005
Rate Topic
Display Mode
Topic Options
Author
Message
satishchandra
satishchandra
Posted Tuesday, October 26, 2010 1:02 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 8:26 AM
Points: 137,
Visits: 316
I wanted to copy the headers of a query result to a excel spreadsheet. In the grid view mode, by default the query editor only allows the results to be copied.
Most of the suggested approaches indicated to change the "Default destination for results" value to "results mode to text". This mode enables the column headers by default. The columns seperated by a tab, which can be copied to csv/excel. We can switch back to grid mode after doing this.
Though this works, there is much more simpler approach which retains the grid mode as well as copy the column headers. No need of switching between modes.
On the SQL query analyzer menu>>>Query Options>>Results---Grid pane, please select the check box, for "Include Column headers when copying or saving the results". This option enables the setting to copy headers always.
Post #1011093
ALZDBA
ALZDBA
Posted Tuesday, October 26, 2010 1:41 PM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 2:17 AM
Points: 6,862,
Visits: 8,049
Thank you for sharing !
Many people didn't find this setting.
With sql2008 that option is included with the right-click on the grid.
Johan
Jul 13
Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere
-
How to post Performance Problems
-
How to post data/code to get the best help
-
How to prevent a sore throat after hours of presenting ppt ?
"press F1 for solution", "press
shift
+F1 for urgent solution"
Need a bit of Powershell? How about
this
Who am I ?
Sometimes this is me
but
most of the time this is me
Post #1011111
bauertechnology
bauertechnology
Posted Thursday, September 20, 2012 12:51 PM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, September 20, 2012 12:50 PM
Points: 1,
Visits: 0
Perfect. Thanks!
Post #1362246
tyson.price
tyson.price
Posted Friday, September 21, 2012 7:05 AM
Valued Member
Group: General Forum Members
Last Login: 2 days ago @ 7:38 AM
Points: 74,
Visits: 600
Good tip...I always right clicked on the results pane and selected copy with headers.
Post #1362639
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.