Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

SQL Prompt Tips #3 - Snippet Placeholder $Paste$

By Steve Jones,

SQL Prompt is an amazing productivity enhancement tool for SQL developers. However there are a number of features that many people are not aware of. These tips will help you learn more about ways in which SQL Prompt can speed your development. We urge you to try each of these tips out for a week or two and see if you find them helpful.

There's a link to a video demonstration of this tip as well.

Snippet Placeholders

One of the neat things that SQL Prompt allows you to do is store code in snippets. Snippets are like templates in SSMS, but they can be inserted into your queries with a few keystrokes, saving you lots of time. For example, one of the most common snippets is "ssf", which is included with SQL Prompt. If I type ssf, I'll see this in SQL Prompt.

The tip that pops up below, shows me this is a script, and there description is "SELECT * FROM fragment". If I wait a second, I'll actually get a pop up with the code in the snippet (as shown here).

If I hit tab, or enter, then I'll get that code inserted.

However I can change this snippet slightly. I can find it in the Snippet Manager and hit Edit.

From there, I can add the $PASTE$ placeholder into my code. 

This will place the contents of my clipboard in the script when it's inserted. I click OK and save this.

Now I return to my query window and copy the name of a table.

I then erase everything in my window. When I type "ssf" and hit tab, I get this:

There are a variety of placeholders, and we'll discuss others in another tip, but they are very handy for customizing your snippets, and speeding up your development.


You can see a video demonstration of this tip below from Tom Crossman, one of Red Gate's talented employees working on SQL Prompt.

Total article views: 209 | Views in the last 30 days: 4
Related Articles

Share t-sql snippets to the team with SQL Prompt

Red-Gate SQL Prompt is a plugin for SQL Server Management Studio that makes the developers life easi...


SQL Prompt Tip #6 - Insert Semicolons

A quick SQL Prompt tip to automatically add semicolons to your code.


How to share redgate database tools settings with Team Foundation Service

In a previous post we’ve seen how to share the SQL Prompt snippet folder to the development team. We...


Masking Parameter prompts

Masking Parameter prompts


SQL Prompt – new features in version 6.x

I’ve been using SQL Prompt for years. In September 2013, version 6 was released (quickly followed ...

quick tips    
sql prompt    

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones