Solved

After exporting sql grid results (or copy and paste in Excel) - Header is missing. How do I export (or copy) the column titles?

Posted on 2008-06-23
6
986 Views
Last Modified: 2010-04-16
After the sql query runs, when I copy and paste (or export to .csv) results in Excel - the header doesn't come with it.  How do I get the header to copy over?
0
Comment
Question by:glabossi
  • 3
  • 2
6 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 500 total points
ID: 21847001
in management studio, to go tools, options, query results, sql server, results to grid...make sure the option is checked to include column headers.
0
 

Author Comment

by:glabossi
ID: 21847058
THe funny thing is that it is already set like this?  I still can't get the headers!
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 21847073
Hmm...you've got me then.
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 

Author Comment

by:glabossi
ID: 21847171
Darn.  Me too!  It should be obvious that that would do it but I still get no headers!  I'm in SQL 2005 Query Analyzer.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 21847205
Thats really wierd....its always worked for me....
0
 

Expert Comment

by:Agesh
ID: 22116800
From MSSMS go to  QUERY---QueryOptions--Grid then CHECK on the 'Include column headers when copying or saving results'
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question