I love Redgate tools. Most of all, I love SQL Prompt because its features increase my productivity on a daily basis. Recently I discovered a couple of new features for the SQL Server Management Studio results grid. The usefulness of these features is incredible.
Script to Insert
By selecting rows from the results grid, you can right-click and selection Script as INSERT. This will script out a temporary table and the associated INSERT statement for the values selected.
Copy as IN clause
Even more common than scripting out INSERT statements, I may need to copy a set of values and format them for an IN clause. Normally I would use a text editor such as Notepad++ to reformat the multiple lines of values. SSMS can also be used but I find Notepad++’s find/replace features better.
Now I do not have to worry about copying/pasting the values and making changes. SQL Prompt delivers a direct conversion from values to IN clause.
Open in Excel
Last but far from least, the Open in Excel feature is my absolute favorite. I cannot count how many times I have been asked to run ad hoc queries in production and send results back to the requester. Excel tends to be the preferred delivery mechanism for these types of result sets.
We can thank Buck Woody, and SSMS 2008, for making the results grid copy natively into a format which works well for Excel but now we can thank Redgate for short circuiting the entire process and jumping straight to the end result. Also, SQL Prompt handles large exports to Excel much better than the copy/paste method. With the normal method, there is no acknowledgement of the paste being in progress and I have seen Excel crash during the process. SQL Prompt’s feature appears to be incremental and provides a progress bar.
Keep up with Redgate’s product updates. I am always pleasantly surprised with the power of the features that they are developing. They understand that elegance and usefulness do not require complicated technical features. Simple but profound features are what help us DBAs streamline our work days.