Kenneth Fisher links to a set of T-SQL formatters:
I have a hard time working with code that’s so badly formatted I can’t read it. Normally I’d just format it myself, but this was a good dozen pages long. So what did I do? I ran to twitter screaming for help.
And I got a lot of responses! Here were the recommendations followed by who recommended them:
My favorite is DevArt’s SQL Complete, which is a paid product, but covers almost perfectly our 30-some page T-SQL formatting guideline.