Formatting SQL statements for human eyes (also) [EN]

You know, often SQL statements are written by SQL gurus, or they just prepare views or tables that can be "read" by Notes programmers (I'm thinking to i5/DB2/Oracle/SQLserver guys) using just a simple statement like "SELECT * FROM mytable" .

Recently I had to develop very complex SQL statements to get data from i5 systems, using NSFDB2 and federation on R8: problem is SQL statements in Query Views (QV) cannot be just pasted as text in the SQL formula area, I had to remove all carriage returns, extra-spaces and so on... Everything should be on "one row"...
For that I used a good text editor called Notedap++, that was very handy.

Later on, I had to reverse the "just one line" SQL statement to a readable format, formatted in easy way, something like a beautifier for SQL statement.

After some googling I found a very good tool called SQLinForm !

Some features:
  • it's free
  • it's written in Java
  • it can be used online in a web browser and also offline
  • it process several SQL dialects
  • it can output the newly formatted SQL statements to several programming languages
  • it formats SQL keywords using colors
  • other handy features...
In small words, it can save your time! Take a look to some screenshots.

Cristian D'Aloisio

No comments: