SQL Prompt 10

Refactoring Queries and Query Results

Refactoring queries:

SQL Prompt'a Inline Exec feature will refactor an EXEC command into an inline query, and Refactor INSERT into UPDATE... refactors INSERT statements into UPDATE statements.

Refactoring query results:

If you to include the query results in a document or email, for reporting, it will inevitably involve a lot of manual tweaking to get the results into a readable format. Likewise, if you need to use the query results to populate another table, or to search from matching rows in another table, it always entails extra work with formatting the output to get a working query.

When you’re working in the SSMS grid format results, SQL Prompt’s right-click context menu offers three features that can help. Two of them, Copy as IN clause and Script as INSERT, will ‘refactor’ query results into code that you can use in another query, and the third, Open in Excel will export the results directly to Excel, for reporting.

Learn more:


Didn't find what you were looking for?