SQL Query Analyzer question

I often copy & paste a query results set (from grid layout) into an Excel file, but I can’t figure out a way to copy the column headers as well. Anyone have a solution?

Thx,
Patrick

[QUOTE=pjdevitt]
I often copy & paste a query results set (from grid layout) into an Excel file, but I can’t figure out a way to copy the column headers as well. Anyone have a solution?

Thx,
Patrick
[/QUOTE]

In MS Excel, try this:

[ol]
[li]From the menu bar, click “Data”.
[/li][li]Select “Import External Data”.
[/li][li]Select “New Database Query”.
[/li][li]Choose the DSN to your database (create one if you don’t have one yet).
[/li][li]Provide credentials when prompted for login, click “Options” and select the database from the list.
[/li][li]Select your table.
[/li][li]Follow the proceeding prompts (which are self-explanatory) and you should get the result on an excel worksheet with column headers.
[/li][/ol]