Chad Callihan takes another look:
I posted a few months ago about the latest SQL Server Management Studio updates, including a preview of their SQL Formatter. SSMS 22.9.0 was released a few weeks ago and called out some SQL Formatter improvements on the release announcement, so I thought it would be worth taking a fresh look to see how things are moving along.
Click through for Chad’s current thoughts. The big challenge with a good SQL formatting tool is that it be adaptable to somewhat complex formatting standards. If the tool can’t do what your team has agreed on, then the tool’s not going to cut it for more than occasional personal use.
I’d like any of the formatting tools far more if they worked off a template file rather than static analysis. There just aren’t enough options/rules to make static sets comprehensive enough. Linters only go so far.
Yeah, I will say that my best experience with SQL formatting was DevArt’s SQL Complete product, which had some fairly sophisticated configuration options. It still wasn’t perfect, as it choked a bit on the way I differentiated formatting for common table expressions versus subqueries, but it hit a lengthy Word doc full of very specific corporate formatting about 95-97% right. I just don’t use SSMS anymore, so I stopped paying for a license a couple of years back.