I have spent countless hours of my life staring at SQL code. While I made every effort to keep my own SQL neat, it's not always easy to decipher errors in complex queries - especially those in legacy code or written by developers who don't share my passion for code formatting.

Today I was fortunate to find an excellent SQL prettifier that analyzes code (like a lint-style tool) and formats it with proper capitalization, indentation, and so forth.

Here's the link; I hope it saves somebody time in debugging and managing SQL code as it has just done for me.

http://www.dpriver.com/pp/sqlformat.htm?ref=g_wangz