Thursday, December 22, 2011

SQL Formatting within SSMS

I don't think I'm alone in having wished time and again for a good SQL formatting option from within SSMS. I've posted about using Oracle's SQL Developer as a decent SQL formatting tool, but that's a second-rate option, given that it doesn't understand all of TSQL's unique syntax.

I stumbled across a better option yesterday, one that (a) is free and (b) integrates nicely within SSMS.

First, the link: "Poor Man's T-SQL Formatter."
You'll find decent instructions for installing it on the site; the documentation is pretty good.

[Update] This now is included within NPP's plugin manager, so installation is a snap!

If you're using SSMS Tools, you'll find that the SSMS Tools find function is mapped to the same default keystrokes as for the PoorSQL formatter. I ended up re-mapping the PoorSQL formatter to use another keystroke combination (CTRL+K, CTRL+Shift+F).

I'm a fan: this integrates nicely into SSMS, it's free, and it works quite well. Check it out.

No comments:

Post a Comment

Thanks for leaving a comment!