SQL Prompt

SQL Prompt

SQL Prompt Hidden Gem: Auto-fill the GROUP BY clause

“Have you seen this new feature that auto-fills the GROUP BY with non-aggregated columns!” exclaimed my co-worker, soon after she had installed a new version of SSMS. I hadn’t, but I was intrigued. I must have written thousands of aggregate queries in my career, so it sounded like it could save me some time. I Read more

SQL Prompt

A day in the life of a developer with SQL Prompt

I’ve a a busy day ahead of me, working on a new reporting query, plus reviewing some initial database designs for the team. We’ve done the morning stand-up meeting, I’ve had my morning coffee, SQL Server Management Studio and SQL Prompt are open, and I’m ready to start work! 10.00AM – Prompt Tab History I Read more

SQL Prompt

How to record T-SQL execution times using a SQL Prompt snippet

A SQL Prompt snippet is a pre-defined block of code, which we can insert at the current cursor position, or around currently-selected SQL text, in an SSMS query pane. DBAs use them to store all their most commonly-used checks and routines. It’s often useful to have your favorite troubleshooting scripts available to you within a Read more

SQL Prompt

Templates and Snippets in SSMS and SQL Prompt

In SSMS, we have access to templates that provide building blocks for creating various types of query, common routines to create various schema objects, or to do common DBA tasks such as running backups. We can also use SSMS T-SQL code snippets to define the basic structure for a block of code or a T-SQL Read more

SQL Prompt

How we used your feedback to improve parentheses formatting in SQL Prompt 8.1

After we released SQL Prompt 8, our priority was to continue to support the new formatting engine by fixing any bugs and reviewing feedback from users. One of the recurring patterns we noticed in your feedback regarded parentheses formatting. Some of you told us you couldn’t format the parentheses exactly the way you wanted to. Read more

SQL Prompt

The SQL Prompt Functionality Finder

You’ve got SQL Prompt, but are you aware of all the things it can do and how to get Prompt to do it? In this article, Phil Factor provides a handy table to make it obvious. As soon as you open SQL Prompt and start typing, its IntelliSense suggestion window will pop up, offering context-specific Read more

SQL Prompt

SQL Prompt Tip: how to control when the suggestion box pops up

By default, SQL Prompt shows code auto-completion suggestions automatically, and continuously. In practice, when writing code, this means that the suggestion box pops up whenever SQL Prompt thinks it can make a useful suggestion, which is at virtually every keystroke. That isn’t the way that many of us want it to work. Sometimes, as programmers, Read more

SQL Prompt

Using multiple custom SQL formatting styles in SQL Prompt

Usually, when coding SQL, you will want to go along with the coding style of the team you are working with. In my previous articles on SQL Prompt, I explained why a team of programmers might want to adopt a T-SQL coding standard, how SQL Prompt could make this easier, and then how to use Read more

SQL Prompt

The Louis Davidson custom style for SQL Prompt

My previous article in this series explained why it’s important for a development team to adopt a common standard for formatting SQL code. It also gave a broad overview of the styles and actions within SQL Prompt that can help define and implement that standard. Unfortunately, many teams avoid the topic of a standard code Read more

SQL Prompt

How to implement a SQL formatting standard using SQL Prompt v8

With ten programmers working on the same project, how do you agree on a standard style for formatting SQL code, and then implement it consistently? One way is through draconian rules, meeting after meeting, and the occasional sacrifice of a programmer to put the fear in those who remain. If that doesn’t sound like fun, Read more