The SQL Prompt Team has been working hard at the Redgate campus in England, and they have out done themselves yet again with their latest release, SQL Prompt 6.5. I’m extra excited about this release, due to the fact that several of the features I’ve been wanting for a while are available this time around. In this post, I’m going to go over my top three favorite new features.
Tab Coloring
I was so happy to see this feature move from the Experimental Lab List to the Feature List. It was like watching Pinocchio become a real boy. Not only does this feature behave the way it did when it was on the Experimental Lab List, but they added some additional cool features to it.
So what does it do for you? It colors the tabs of each query window based on environment settings that you set up. You’re probably thinking, “Yeah, Mickey, but SSMS already does that in the status bar for me.” Well, the Tab Coloring in SQL Prompt is way better. Here is why.
I rarely look at the status bar, but I’m always looking at the top 20% of the screen, so for me, a very visual person, having the color in that top 20% of the screen is much more effective. SQL Prompt provides that for me, by coloring the tab of the query window and adding a line of the same color below the status bar. If you undock the query window, then the whole window is outlined in the tab color.
You can create as many environments as you want and you can pick any color…or shade of color that you want. This was one of the improvements to Tab Coloring from when it existed in the Experimental Lab list.
To modify the environments, follow these steps:
- Go to the SQL Prompt menu and select Options.
- Select Colors from the Tabs list on the left hand side.
- Click on the Edit Environments button in the bottom right hand corner, under the table.
- Add or modify an environment.
- Click on a color to modify the color to meet your needs.
- Apply these environments to the servers they represent on the previous window.
I’m notorious for saving stored procedures in the Master database in development. To help prevent this, I can set up a Tab Color for a specific database on a specific server. For me, that would be the Master database in dev. I love this!
To do this, follow these steps.
- Go to the SQL Prompt menu and select Options.
- Select Colors from Tab list on the left hand side.
- Click on the Add Server/Database link in the table.
- Add a Server Name in the first column.
- Add a Database Name in the second column.
- Select an Environment for the color in the third column.
Note: In the above example, all three colors are for the same server. This means that when the data is not Utility or Master, then the tab coloring will be green…even for new databases on that server. |
In Tab History, you can see which environment each query ran on last. In the example below, I can see that I ran SQLQuery6 in the Master database on SQLDemoMonkey. I know this due to the fact I set up a database specific Tab Color for the Master Database on SQLDemoMonkey. (I guess I should go make sure I didn’t create a stored procedure in that database.)
Intelligent Intellisense for GROUP BY
One of the boring tasks for writing a GROUP BY statement, is re-writing all the columns that you already wrote in the SELECT section of your query. Many times, I’ll copy what I wrote in the SELECT section and paste it under GROUP BY …but then the list still requires editing. Not any more. SQL Prompt now provides an intelligent intellisense for GROUP BY. Take a look:
In this query I used Ctrl + to get the intellisense to pop up for my GROUP BY. At the top of the list, there is a shortcut for having all the non-aggregated columns inserted for you. Also notice that RequestType from line 42, is not listed at the top of the intellisense box, because it is an aggregated field.
Format Actions and <ctrl> + k, <ctrl> + y
I wrote a post, back in July of 2014, about SQL Prompt formatting shortcuts. I wrote:
As a power user, my key strokes will look like this when I use them all at once: + bw, bq, bc, ky and finally + e to execute my code. Here is an example of how an ugly duckling turns into a beautiful swan by applying all of these hot keys at one time. |
That long list of key strokes is now obsolete. (And there was much rejoicing). I now can select from a list of formatting options that will be applied with only the Ctrl + K, Ctrl + Y shortcut. This is so much easier!
To modify the list of formatting options, follow these steps.
- Go to the SQL Prompt menu and select Options.
- Select Actions under the Format list on the left.
It’s A Wrap
I only listed three of the new features that SQL Prompt 6.5 has. I encourage you to take a look at the Release Notes for the full list. If you don’t have SQL Prompt, then download a free 14 day trial here. If you already have SQL Prompt, then you can go to the SQL Prompt/Help/Check For Updates menu item to get the latest version.
Tab colors? What the heck? This is awesome!!!!!
The Tab Colors is an absolut fantastic feature!!!
Thanks for informing us about it!
Under tabs, I can only see history. Perhaps because I am using SSMS 2008
Just download 6.5 and I can’t see any Colour under the Format option 🙁
Hi Steve,
That was a type-o. Sorry about that. It has been fixed. You can see the options in the Tabs list in SQL Prompt-Options. Have fun playing with it!
Mickey
Mickey,
must be having a senior moment, but I still can’t see the feature 🙁
Go to menu SQL Prompt / Options and the Tabs section only has History ???
My SQL Prompt is v6.5.0.326
Hi Steve,
You are using the correct version. I think it might be time to send in a support ticket. Send a screen shot if the website will let you.
https://redgatesupport.zendesk.com/home
Mickey