2007
08.29

SQL String Formatter (Part 1)

I am looking for a code (or command line software) that able to format/tidy-up SQL string to make it readable and doesn’t irritate the eyes. So far I have found:

  1. SQLinForm
    It’s quite handy, you can run it on your browser and download the offline version which is packaged into one single Java Jar file. Unfortunately, I’m looking for something with with command line or open source. At least with command line support I can invoke it from my .NET program to process the temporary file.
  2. SQL Online Formatter
    Still without the programmability support.
  3. SQL Review
    With command line support. Unfortunately It’s throwing error on one of my stored procedure, but it still gives you the output.
  4. Pl/Sql Tidy
    This program is only available in command line. Unfortunately, it never able to process my stored procedure. I not so sure whether it’s still maintained.
  5. Using Flex Script.
    This page is pure inspirational. It immediately opened up my eyes for the possibility of using Flex or Regular Expression. I think will stick to this solution.

Although I have made up my mind, I will provide the output of each program in the next posting. Hopefully once I am be able to port VS. Babu’s lex script (or make my own regular expression code), I will share it with you all.

Credits:

1. Carson McDonald

GD Star Rating
a WordPress rating system

Incoming Search Term

Advertise Here

1 Trackback

 

4 comments so far

Add Your Comment
  1. Hi!

    I wrote Pl/Sql Tidy. It should work in most cases.
    Do you use Pl/Sql?
    Send me an example when it does not work.
    I will look at it.

  2. Hi Marton,

    Does Pl/Sql tidy only accepts PL/SQL syntax?

  3. Yes, it only accepts Pl/Sql Syntax.

  4. You can also try T-SQL Beautifier here:
    http://www.ubitsoft.com/products/t-sql-beautifier/index.php