Skip to content

From the Labs of SQL Prompt

May 21, 2012

I love SQL Prompt as an add-in for SSMS. The intellisense is very handy for me and I’ve gotten used to certain shortcut combinations that make it easy for me to write T-SQL quickly and get information on parameters without opening Books Online. It’s works better than the native intellisense for me, though perhaps I’ve just gotten used to it. When it’s not installed on an instance in one of my VMs, writing code is a chore.

When I was in Cambridge recently, I had the chance to sit down with one of the developers of SQL Prompt and he showed me a few things I had never seen.

For the most part when I install SQL Prompt, I leave it with the defaults. There are a few snippets that I change quickly, like the ssf snippet. This normally produces a “SELECT * FROM” and I add a “TOP 10” to it in order to reduce the amount of data I bring back.

However there are a few features in SQL Prompt that are “experimental” in nature. They are complete, but not deployed into the product by default. You can access them from the SQL Prompt menu in Management Studio.

prompt3

This brings up the Experimental Features tab in the options dialog, which you can see below. There aren’t a lot of features, but these are ideas that have been suggested, or are working, but they developers aren’t sure if they are completely spec’d out.

prompt4

You can enable a few of these to see if you really want to see how they work. For example, I’ve enabled “Automatic Refresh Suggestions”. Since I tend to work in one database at a time and create lots of objects, I want this to happen. I can ALT+S, Enter for this, but I’d like to tool to do it for me.

These items change periodically, and some link to related tools (like SQL Tab Magic), and they give you a chance to test the way the feature works and provide feedback. If you are a SQL Prompt user, you might check out this tab.

If you’d like to see what SQL Prompt can do for you, download a free trial and give it a try:

14-day-free-trial

About these ads

From → Blog

4 Comments
  1. Dave Poole permalink

    The fact that the old SQL Refactor and SQL Prompt has merged into SQLPrompt5 is a great bonus.

    If an object has an MS_DESCRIPTION extended property then SQL Prompt exposes this description as part of the intellisense.

    My team share snippets by having a central place to copy the snippets to. When they log in a startup file xcopies the snippets to the appropriate location on the box.

    This is really an update of the methods desribed in http://www.sqlservercentral.com/articles/System+Development+Life+Cycle/62933/

    I too feel like my arms are chopped off if SQL Prompt was removed and no, I don’t work for Red-Gate.

  2. Steve Willis permalink

    I would find it difficult to work in SSMS without SQL Prompt. I’ve been using SQL Prompt for over a year and it’s an indispensable tool. The snippet manager is a real time-saver. I’ve entered things like Insert and Update statement blocks formatted the way I like them and all sorts of common scripts which I used to keep in text files. So now, for example, if I set up a new database and want to create a tally table I just type in “ctally”|Tab and the script is generated ready to run. Or type in “csp”|Tab and a blank stored procedure is ready to go formatted the way I want it.

    Another feature I couldn’t live without is the auto-formatting of code. I can take the worst looking SQL code and just do CTRL-K-Y and it’s formatted exactly like I want it. The auto-formatting can be customized to layout your code to whatever your standards may be. It will replace tabs with spaces (or vice-versa), can switch commas at the end of column names to the beginning of the line, convert keywords to upper-case, etc.

    Thumbs up!

     

    • I tend to format as I go along, but I do love the reformatting feature when I look at someone else’s code.

Comments are closed.

Follow

Get every new post delivered to your Inbox.

Join 4,914 other followers

%d bloggers like this: