I’m going to post this entry *before* my blog starts being run on sqlservercentral.com so that people don’t assume it is influenced by that in any way. Redgate is quite simply the best company I have ever done business with. Every single interaction I’ve ever had with them has been all I could ask for and then some, and left me feeling good afterwards. Every one of their tools that I try out changes the way I do things for the better in some large way. I’ll probably talk about a few of the tools and how they helped me over time, but for now I’ll stick with SQL Prompt.
SQL Prompt is basically Redgate’s Intellisense tool. Until recently, SQL server didn’t offer intellisense and this filled an extremely valuable gap. Personally, I’ve developed *without* intellisense for so long and type so fast that it actually annoys me as often as it helps; so I turn off the suggestions and only have it supply them when I ask for them. Even without this though, several aspects of SQL Prompt save me a massive amount of time in my daily coding.
- Column name lists. These filter as you type them so you can just hit tab to complete the name. Very useful if you can’t remember the exact column name. This works as soon as you have the from clause on your query (and supports table aliases), so you’ll likely get used to writing the FROM clause of your queries first if you end up using the tool.
- SELECT * FROM <table> replacement. SQL Prompt can automatically fill out all the field names. Huge time saver.
- INSERT INTO <table> (Or Update). SQL Prompt will generate all the fields in the insert list and corresponding values fields with a commented out field data type next to it.
- EXEC <stored procedure>. This one is great. This will supply all of the parameters that a stored procedure takes and the data types they should be filled in with.
- Snippets: You can save snippets that can be auto inserted based on typing. One that I use all the time is my ‘header’ snippet, which is 15 or so lines of commenting that I put at the top of all my stored procedures. I also save things like commonly used CTE’s and small bunches of code that I run all the time to analyze performance problems.
There are two. The fact that there are only 2 really says a lot for the product, because I’m exceptionally picky when it comes to tools that I use.
- The first is that it doesn’t highlight the beginning parenthesis as you close one. Most versions of intellisense do this and it’s extremely handy as a quick reference to make sure you’re not lost in some monstrous nested function string. Useful feature, maybe they’ll add it at some point.
- The second is actually a major annoyance and applies to both parenthesis and single quotes. It auto replaces closing parenthesis/quotes as you type if there was another one immediately after your character. For example:
Let’s say you have a statement like
SELECT DATEADD(d, DATEDIFF(d,0,@MyDateField), 0)
Then you decide you wanted to just use
GETDATE() instead of
@MyDateField , so you type it in.
This would leave you with
SELECT DATEADD(d, DATEDIFF(d,0,GETDATE(), 0)
This is wrong. It should be:
SELECT DATEADD(d, DATEDIFF(d,0,GETDATE()), 0)
SQL Prompt automatically replaced the ) that was already there to close the DATEDIFF with the one you typed in with GETDATE(). It does the same thing with single quotes (which gets extremely confusing when you’re doing crazy things with dynamic SQL strings). So, if you do use SQL Prompt (as of version 126.96.36.199) be aware of this. To get around it, either plan on it and type an extra ), or move your cursor so that it is to the right of the last ) or ‘ and then type another one. It only replaces them to the right, not the left. Also, if you have a whole series of end parenthesis, like )))), you’d actually have to type in the ) 5 times, as it would continually replace each one until you got to the end, and then you’d be inserting a fresh one.
I reported this ‘bug’ to them and asked if there was any way to not have it happen (to see if it was just a menu option somewhere). While there is unfortunately not a fix for it at the moment, have a look at the response I received (less than 8 business hours later) from their support department.
Thanks for your enquiry.
I have reproduced the scenario you described, and unfortunately there isn’t a way to turn off this behaviour.
I have logged this as a bug with SQL Prompt 4, and now the developers are reviewing the issue.
Once they have had a chance to look at it, I can let you know if/when it will be fixed.
For your reference, the bug tracking code for this is ———
First class all the way in my opinion; this is everything you could ask for in a response (other than an actual fix). So… if you aren’t annoyed by intellisense like I am, this tool is probably an even bigger benefit to you, and I’d definitely recommend heading over to www.RedGate.com and downloading the SQL Toolbelt (available for a free 14 day trial). I’m most likely going to be purchasing the entire toolbelt soon and will talk about a couple of the other products once I have full copies. SQL Compare in particular is amazing even from the short time I spent playing with it.