Column Headings from SQL Results – Easier Way

I posted yesterday on pulling the column headings from a SQL Server result set and transferring them to Excel.  I received a comment from Scott Stonehouse outlining a much easier way to do what I need to do.

Simply access the Tools Menu and select Options.  On the left, expand Query Results/SQL Server and select Results to Grid.  On the right check Include column headers when copying or saving the results.

2008-04-24_084916

Run a query in SQL Server Management Studio and select the contents of the result set.

2008-04-24_085755

 

Paste the results into Excel – like magic, there are the column headings.

2008-04-24_085900 

To me, Scott proved what the Internet and blogs are for.  Teaching and Learning.

Advertisement

Posted on April 24, 2008, in SQL Server. Bookmark the permalink. 3 Comments.

  1. scottstonehouse

    Glad I could help! Trust me, I’ve learned lots from reading your stuff!

  1. Pingback: Dew Drop - April 25, 2008 | Alvin Ashcraft's Morning Dew

  2. Pingback: Social Networks/Blogging and Self-Improvement « Rhonda Tipton’s WebLog

Leave a Reply

Please log in using one of these methods to post your comment:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.