dbTalk Databases Forums  

Retrieve column headings from query

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss Retrieve column headings from query in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Retrieve column headings from query - 05-13-2008 , 04:40 PM






BillG_SD (BillDO_NOT_SPAMGiovinetti (AT) NO_SPAMyahoo (DOT) com) writes:
Quote:
I'm using both SQL Server 2000 & 2005. I often perform queries and need
to copy the (grid based) results into Excel 2007. The problem is, the
column headings are not included. Is there a setting to change this?
Otherwise, I have to manually type the column headings by hand.
As Russell said, Mgmt Studio offers an option exactly for this.

In Query Analyzer, the best option is to select output to text, and
then choose tab-delimited format and copy-and-paste that.




--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #12  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Retrieve column headings from query - 05-13-2008 , 04:40 PM






BillG_SD (BillDO_NOT_SPAMGiovinetti (AT) NO_SPAMyahoo (DOT) com) writes:
Quote:
I'm using both SQL Server 2000 & 2005. I often perform queries and need
to copy the (grid based) results into Excel 2007. The problem is, the
column headings are not included. Is there a setting to change this?
Otherwise, I have to manually type the column headings by hand.
As Russell said, Mgmt Studio offers an option exactly for this.

In Query Analyzer, the best option is to select output to text, and
then choose tab-delimited format and copy-and-paste that.




--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #13  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Retrieve column headings from query - 05-13-2008 , 04:40 PM



BillG_SD (BillDO_NOT_SPAMGiovinetti (AT) NO_SPAMyahoo (DOT) com) writes:
Quote:
I'm using both SQL Server 2000 & 2005. I often perform queries and need
to copy the (grid based) results into Excel 2007. The problem is, the
column headings are not included. Is there a setting to change this?
Otherwise, I have to manually type the column headings by hand.
As Russell said, Mgmt Studio offers an option exactly for this.

In Query Analyzer, the best option is to select output to text, and
then choose tab-delimited format and copy-and-paste that.




--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #14  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Retrieve column headings from query - 05-13-2008 , 04:40 PM



BillG_SD (BillDO_NOT_SPAMGiovinetti (AT) NO_SPAMyahoo (DOT) com) writes:
Quote:
I'm using both SQL Server 2000 & 2005. I often perform queries and need
to copy the (grid based) results into Excel 2007. The problem is, the
column headings are not included. Is there a setting to change this?
Otherwise, I have to manually type the column headings by hand.
As Russell said, Mgmt Studio offers an option exactly for this.

In Query Analyzer, the best option is to select output to text, and
then choose tab-delimited format and copy-and-paste that.




--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #15  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Retrieve column headings from query - 05-13-2008 , 04:40 PM



BillG_SD (BillDO_NOT_SPAMGiovinetti (AT) NO_SPAMyahoo (DOT) com) writes:
Quote:
I'm using both SQL Server 2000 & 2005. I often perform queries and need
to copy the (grid based) results into Excel 2007. The problem is, the
column headings are not included. Is there a setting to change this?
Otherwise, I have to manually type the column headings by hand.
As Russell said, Mgmt Studio offers an option exactly for this.

In Query Analyzer, the best option is to select output to text, and
then choose tab-delimited format and copy-and-paste that.




--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #16  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Retrieve column headings from query - 05-13-2008 , 04:40 PM



BillG_SD (BillDO_NOT_SPAMGiovinetti (AT) NO_SPAMyahoo (DOT) com) writes:
Quote:
I'm using both SQL Server 2000 & 2005. I often perform queries and need
to copy the (grid based) results into Excel 2007. The problem is, the
column headings are not included. Is there a setting to change this?
Otherwise, I have to manually type the column headings by hand.
As Russell said, Mgmt Studio offers an option exactly for this.

In Query Analyzer, the best option is to select output to text, and
then choose tab-delimited format and copy-and-paste that.




--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #17  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Retrieve column headings from query - 05-13-2008 , 04:40 PM



BillG_SD (BillDO_NOT_SPAMGiovinetti (AT) NO_SPAMyahoo (DOT) com) writes:
Quote:
I'm using both SQL Server 2000 & 2005. I often perform queries and need
to copy the (grid based) results into Excel 2007. The problem is, the
column headings are not included. Is there a setting to change this?
Otherwise, I have to manually type the column headings by hand.
As Russell said, Mgmt Studio offers an option exactly for this.

In Query Analyzer, the best option is to select output to text, and
then choose tab-delimited format and copy-and-paste that.




--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #18  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Retrieve column headings from query - 05-13-2008 , 04:40 PM



BillG_SD (BillDO_NOT_SPAMGiovinetti (AT) NO_SPAMyahoo (DOT) com) writes:
Quote:
I'm using both SQL Server 2000 & 2005. I often perform queries and need
to copy the (grid based) results into Excel 2007. The problem is, the
column headings are not included. Is there a setting to change this?
Otherwise, I have to manually type the column headings by hand.
As Russell said, Mgmt Studio offers an option exactly for this.

In Query Analyzer, the best option is to select output to text, and
then choose tab-delimited format and copy-and-paste that.




--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #19  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Retrieve column headings from query - 05-13-2008 , 04:40 PM



BillG_SD (BillDO_NOT_SPAMGiovinetti (AT) NO_SPAMyahoo (DOT) com) writes:
Quote:
I'm using both SQL Server 2000 & 2005. I often perform queries and need
to copy the (grid based) results into Excel 2007. The problem is, the
column headings are not included. Is there a setting to change this?
Otherwise, I have to manually type the column headings by hand.
As Russell said, Mgmt Studio offers an option exactly for this.

In Query Analyzer, the best option is to select output to text, and
then choose tab-delimited format and copy-and-paste that.




--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.