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
977 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now