Atlanta .NET Regular Guys

Community Blog for two guys in Atlanta that focus on Microsoft and Community.

Quick About

This is the community blog for Brendon Schwartz and Matt Ranlett.  If you want to see their technical posts visit http://www.sharepointguys.com

Back To DevCow

Recent Posts

Tags

Email Notifications

    Archives

    Shape up that SQL code

    Have you ever worked on some of those one and two thousand line stored procedures where the indentation was so messed up you couldn't really tell where that left outer join fit in?  Wouldn't it be nice if there was a tool out there which would automatically format your code for you, correcting tabs, lining up outputs, and capitalizing key words and such?  Turns out that there are several options out there.  I've used two of them:

    Reg-Gate produces SQL Refactor ($195) that does a bunch of things beyond just reformatting SQL statements.  I tried the demo of this product and felt that it was a great asset and should be in my toolkit.  Unfortunately, $195 is a bit steep for something that I don't need all that often as I don't really live inside of SQL Management Studio.  Maybe a SQL DBA can justify this cost to their employer, but I couldn't.

    I did come across SQLinForm yesterday - a free Java-based formatter which can be used as an online version or as a downloadable desktop version.  It's not quite as nice or flexible as SQL Refactor, and it does required cutting and pasting code, but it does get the job done and show you where your missing closing parens are.  This was very helpful to me in my hours of need last night.