Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting column headers from a grid view

Status
Not open for further replies.

rds80

Programmer
Nov 2, 2006
124
US
If I want to copy the results of a query with the column headers, is there a way to do that in a grid view?
 
You can set the results to text (query-> results to-> results to text). Run your statment then you can just copy and paste what ever you want.
 
Forgot to mention that the results of the query has to be pasted to Excel. Copying the text data to excel isn't the cleanest.
 
I don' know that you can do this from Query Analyzer. The query results to excel menu option will place results in an excel file, but the whole row is in one cell. I imagine this is not what you're looking for.

You could use a simple dts package for this, but that might be overkill. Have you considered using MS Query?

Good Luck,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top