I have developed an usefor tool for developers. Take a look.

niceSQL is a nice-to-have tool for developers.
the application you develop logs the sql statements, that often are big and
very complex, to a file, console window or the output window in visual

niceSQL is an sql formatter.
niceSQL formattes your sql statements so that they become well arranged. It
does not check your syntax.

niceSQL supports selects, inserts, updates and deletes with unions, joins,
case, group, order, having, etc. It also supports stored procedures and
stored functions.

See: http://home.broadpark.no/~ihalvor/