Quantcast

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: , ,

This entry was posted in database administration and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Posted July 27, 2006 at 5:27 am | Permalink

    Hi,
    thx for the nice review of the sqlinform site.
    With the next release I will increase the max size allowed for SQL statements. You will then be able to format monster SQL statements ;-)
    Regards
    GuidoMarcel

One Trackback

  1. [...] Weiteres: phpCodeBeautifier (Win/Linux Kommandozeilentool), HTB 2.0 (ebenfalls Kommandozeilentool). Ein Blogbeitrag über SQL Beautifier. [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>