This is not just a new feature in SQL 2008 but it works in SQL 2005, the feature is just not on by default. To turn it on, select Tools-Options in SQL Server Management Studio. Expand Query Results with the +. Expand SQL Server. Select Results to Grid and check the box "Include Column headers when copying or saving the results." Click Ok.

I felt dumb when I found this the first time but I feel brilliant every time I show it to someone else!
You, Me and Dynamics GP
3 comments:
Cool Tip !
I used to change the results to Text (Ctrl + T) to copy the headers. This will make the task much easier.
Thanks
Tip was very cool.
Other options are we can export the results to File too.
Query -> Results To ->
Results to Text - Ctrl + T
Results to Grid - Ctrl + D
Results to File - Ctrl + Shift + F
Thanks,
Arun.
Excellent!!
Thx Mark
Post a Comment