# Weekly Dynamic: Copy Headings and Data from SQL

- URL: https://dynamicaccounting.net/weekly-dynamic-copy-headings-and-data-from-sql/
- Date: 2009-10-19
- Topics: SQL & Data, Tips & Hidden Features
- Type: original article

Doing data validation, database compares and other queries in SQL Server is a pretty common occurrence when working with Dynamics GP, especially during implementation. Often this involves running a SQL query in Management Studio and pasting the results into a spreadsheet or document. Many people don’t know that a feature in Management Studio is the ability to copy the headings as well as the results with copy and paste.

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.

[![](/img/blogger/733835e41bbb0a4c.jpg)](/img/blogger/c0472f61964947b5.jpg)  
I felt dumb when I found this the first time but I feel brilliant every time I show it to someone else!
