Welcome to Atlanta .NET Regular Guys Sign in | Join | Help

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.

Published 23-05-2007 07:58 by Matt Ranlett
Filed Under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

What do you think?

(required) 
(optional)
(required) 

About Matt Ranlett

One of the two original Atlanta .NET Regular Guys, Matt fills his free time by helping to run several Atlanta area user groups, the Atlanta Code Camps, and works as one of the two INETA co-Vice Presidents of Technology
SkinName:iroha_Blog2
Powered by Community Server, by Telligent Systems