One tool I can’t give enough love for is DevArt’s dbForge SQL Complete. This tool fits in a fairly crowded space, and I’ll say that I tried Red Gate’s SQL Prompt and ApexSQL’s ApexSQLComplete products before settling on DevArt’s version.
All of these are solid products, but there’s a big reason I chose SQL Complete: the breadth and depth of its formatting rules. We have fairly stringent coding practices when it comes to formatting code, but this wasn’t always the case, thus leading to thousands of stored procedures in various degrees of upkeep. Every once in a while, you go in to work on a piece of code which clearly hasn’t been maintained in half a decade, and that’s where a tool like SQL Complete shines. I just hit the semi-colon key (which is the key I set up to trigger auto-formatting) and let the formatting engine fix that procedure for me. It’s not perfect, but it saves me 95-99% of the hassle of formatting code. It’s also a life-saver when you have to debug some horrible, 2000-line mess that got generated from dynamic SQL.
This product has a free version, but I ended up paying for the full version because it offers some things I needed that the free version lacks.