views:

288

answers:

5

I currently work with an Oracle database and we use stored procedures for all our SQL queries. The problem I have is that we do not really having a coding standard for our packages. So what happens is that every developer has a different style (or in some cases no sense of style) in how they format there packages. Making them difficult to read and work on with out first reformatting. We all pretty much just use Notepad or Notepad2 to write our packages.

I am unfortunately not in a position to mandate a coding standard and enforce it (just a code monkey at this point) so I was hoping to find a free SQL code formatter that I can use myself, and possibly suggest to others on the team to use, to make my life easier.

I have considered writing a small application that would essentially take a file as input and reformat everything, but before I did this I figured I would ask if anyone new of such a tool that is already available and is free.

So does anyone now of any such tools available?

+1  A: 
jms
+1  A: 

I like TOAD for Oracle. It has a format feature that's decent. I see there's a freeware version, though I have not used it.

Josh Buedel
+1  A: 

Toad for Oracle

Toad for Oracle, free version

  • free
  • this will do what you want
  • limitations are related to number of connections, size of data mods, etc.
  • http://www.toadsoft.com

Oracle SQL Developer (up and coming, free!)

Mark Harrison
+1  A: 

There is a free one online sqlformatter, also sqlinform, personally i use TOAD and have done since before it was bought by Quest (10 years?)

stjohnroe
+1  A: 

I had the exact same experience from Day One working with Oracle stored procedures - "I have to use NOTEPAD?! Oh HELL no."

So I hopped on the internets and what I found were people saying "Hey, I have to create stored procedures in Oracle, isn't there anything better than NOTEPAD?!"

And the canonical answer was: "Download TOAD, you'll be glad you did". So I followed their advice, was very happy with it, and I'm pleased (if a bit amazed) to see it is still a popular answer.

blinderzoff