SQL Beautifier

I pulled a large amount of SQL out of some existing code and wanted to have it formated nicely for me. I figured there had to be some type of pretty printer for SQL available outside of applications like TOAD. I have access to TOAD but it would have required a reboot so I figured I would ask google what to do. There seem to be a number of different formaters out there. I found a couple people talking about current options a list here and here. The following list is a summary of the options I found:

I decided that since SQLInform was mentioned a lot I would give it a try. I was suprised at how well it did. I gave it a huge amount of SQL to re-format and it gave it back to me formated. There is a limit on how much you can ask it to format at once but that shouldn't be a big issue. I didn't see that it choked on anything that I gave it and there were all kinds of nasty things going on in the SQL.

One interesting thing to come from this is that it seems there are no open source or truely free unix based formaters out there. It seems like it would be easy enough to get going since the SQL grammar is available for a number of different parser generators.

Tags: , ,

Leave a Reply

Your email address will not be published.