SQL Query Analyzer question

P

pjdevitt

Guest
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
 
pjdevitt said:
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

In MS Excel, try this:

  1. From the menu bar, click "Data".
  2. Select "Import External Data".
  3. Select "New Database Query".
  4. Choose the DSN to your database (create one if you don't have one yet).
  5. Provide credentials when prompted for login, click "Options" and select the database from the list.
  6. Select your table.
  7. Follow the proceeding prompts (which are self-explanatory) and you should get the result on an excel worksheet with column headers.
 
Back
Top