You need a fast, general-purpose way to save the results of a query or batch or procedure into any sort of worktable, such as a temporary table or a table variable or table valued parameter. A simple SELECT…INTO isn't versatile enough for these requirements, and the alternative ways to handcraft the list of columns are slow and error prone. Phil Factor shows how to create a 'table-build generator' that will do all this, and save you a lot of time, especially if you use a lot of working tables in your code. Read more
Phil Factor explains the uses and limitations of native SSMS templates and snippets, and then demonstrates the extra versatility that SQL Prompt snippets provide. Read more
Louis Davidson explains how he manages and shares several different sources of SQL Prompt code snippets, in a single Snippet library, using Dropbox and source control. Read more
Imagine having at your fingertips all the metadata queries you need to explore your SQL Server databases and then, a few clicks later, all your diagnostic queries to troubleshoot their performance. Phil Factor demonstrates how it can be done, by storing each set of snippets in a standard JSON collection and using PowerShell to convert them to SQL Prompt snippet files. Read more
Louis Davidson provides a pair of SQL Prompt snippets that will help you deal with dependencies, whenever you need to drop columns or tables. Read more
Louis Davidson discovers the joy of using SQL Prompt code snippets to remove repetition from a variety of tasks, from inserting comment headers, to creating tables, to executing useful metadata queries. Read more
With SQL Prompt and Phil Factor's chk code snippet, you can, with a few clicks, get a list of all the SQL statements executed within a batch, in SSMS, their execution plans, and their execution statistics, such as duration, CPU, logical reads and so on. Read more
A strategic view of how a development team can use SQL Prompt to establish and share coding standards, through code analysis rules, formatting styles and code snippets. Read more
Phil Factor improves SQL Prompt's built-in ALTER TABLE ADD (ata) snippet so that it enforces certain coding standards, such as specifying whether the column accepts NULL values, and ensuring the new column is well-documented. Read more
Phil Factor demonstrates the power of placeholders in SQL Prompt Snippets, for selecting and copying text. They make it very easy to build queries by dragging-and-dropping from the SSMS object explorer, and also to save queries as reusable views or inline table valued functions. Read more
Write, refine, format and test a reporting query before lunch then refactor a database, and retest the new design, afterwards. All in a day's work for a developer armed with SQL Prompt. Read more
Phil Factor shares a SQL Prompt snippet called timings, which he uses as a standard testbed for getting execution times for procedures and functions. Read more
You have SQL Prompt, but are you aware of all the things it can do and how to get it to do it? Phil Factor provides a handy table to make it obvious. Read more
A good DBA will automate repetitive tasks, but sometimes you need to troubleshoot a problem ‘live’, with people standing over you, and the pressure on. This is something that can’t be automated. SQL Prompt snippets have helped me out in this sort of situation numerous times. Built-in SSMS query shortcuts SSMS provides a few shortcuts Read more
SQL Prompt includes a number of snippets by default that can help you quickly write T-SQL code. These are templates of code that users use regularly. One of the more popular snippets is the ‘cdb’ snippet that helps with quickly creating a new database for development work. This can also be used to ensure production Read more
SQL Prompt includes a number of snippets by default that can help you quickly write T-SQL code. These are templates of code that users use regularly. One of the more popular snippets is the “ii” snippet that helps with inserting data into a table. If I type “ii” and hit tab, I quickly get the Read more
I’ve been experimenting with Extended Properties, and I found myself slightly annoyed by the syntax of adding and updating Extended Properties. I decided to take advantage of SQL Prompt to store the commonly used code for adding and updating properties. Adding Properties I’m a big fan of naming the snippets the first thing that comes to mind. Read more