Blog Post

SQL Prompt – The Power Within

,

*Photo by Red Gate

*Photo by Red Gate

Come a little closer; no seriously come on over just a little closer as I don’t want to you to miss this. Can you hear me? Good, listen if you are in this Data Professional game for very long than you will have some “go to” utilities when you need them. Over my 14 year career thus far I’ve accumulated many scripts, procedures, techniques, and vendor related products.

One product that has remained steadfast for me over the past several years is Red Gates’ SQL Prompt. If you are already using this utility than you know what I am talking about; if you haven’t then you are missing out. I’m continuously amazed at some of the options the product contains. A brief overview and you will find the following:

  • IntelliSense-style code completion
  • Customizable code formatting
  • Save code snippets
  • Refactor SQL code
  • Tab History – save, search, and recover tabs in SSMS

Why did I bold Tab History you may ask? Well pull up a chair, sit down, and listen up.

The Setting

Have you ever had one of those mornings where you wished you would have stayed in bed, perhaps one might call it a “do over”. Well that was me not long ago; the day was actually fitting as the rain was pouring, had no umbrella present, and forgot the ole key card to the shop. For the ones that know me also know that I quit drinking coffee a while back. Ha, yes, I usually get the jaw drops for fellow co-workers and beyond; if there ever was a day I needed some then it was that day.

I sit down, fire up the laptop, and off we go. I starting looking at my plate and opening up a script I had saved the previous day; or had I?!?!? I go to my repository and nothing, absolutely nothing. As I mutter the words to myself, you got to be kidding me, I dive further into my folder structure thinking I might have misplaced it. Aha (there will be more coming in a future post about this little word), I know what let’s open SSMS and check the most recent files. I know I saved it the day before and I probably just put it in the wrong place. Wait, what, wait a minute – nothing there either.

Well this day is just off to a great start; isn’t it?

The Power Within

As I stand up and start walking to the break room to clear my head, get back on track, and re-asses the events thus far I remember something. SQL Prompt has a built in feature that might save the day. I come back to my desk and look at the following:

Tab History

Tab History – two words. Who knew that they would be so important on a day that started off bleak. I click on the Tab History and complete a search of the word “local” since I knew what was inside the script:

Info

 

Scrolling down through on SQLQuery7 I found my script I was looking for! Yes, if you heard a loud clasp of thunder or the earth moving some more on it’s axis that was me doing a SQL Happy Dance. This one feature saved my bacon due to deadlines that I had to meet the next day.

While this utility is a nice feature, we need to look at the utility in terms of a broader scope. SQL Prompt offers much more.

  • Allowing the ability to write code more smoothly
  • You can customize your SQL Code formatting rules
  • Affords you the ability to save code snippets and better yet share them across your team
  • Refactors SQL code
  • Exploration of your database (another feature I like)

Conclusion

A data professional is always looking for ways to improve their processes and become more efficient. SQL Prompt is a utility that accomplishes that goal. If you are a seasoned vet of it then great; however if you have never tried it then give it a go. You will be glad you did.

I tell you what; check out what my other colleagues have to say on something they learned recently:

On a SQL Collaboration Quest

Four SQL professionals gathered from the four corners of the world to share their SQL knowledge with each other and with their readers: Mickey Stuewe from California, USA, Chris Yates from Kentucky, USA, Julie Koesmarno from Canberra, Australia, and Jeffrey Verheul from Rotterdam, The Netherlands. They invite you to join them on their quest as they ask each other questions and seek out the answers in this collaborative blog series. Along the way, they will also include other SQL professionals to join in the collaboration.

 

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating