Lunatik
Lunatik

Reputation: 3948

Are there any platform agnostic SQL query builders with syntax, logic formatting etc.?

Are there any lightweight tools that allow easy-to-read crafting of SQL independently of the main apps/utilities associated with a particular database?

I lately find myself working with MySQL, Access & now MS-SQL and use Notepad++ to build queries as it provides basic syntax highlighting that helps my unfamiliar eyes, but no logic formatting - new lines for INNER JOIN, WHERE etc., indenting of continuing parameters, dare I say it even IntelliSense - that kind of thing.

Particularly when re-jigging an existing query that is presented as an incomprehensible lump, it would be nice to be able to paste this in somewhere, click a button and have it displayed in a more human-friendly format.

Does such a tool exist?

Edit: Thanks for the suggestions. In particular, SQLinForm has the kind of fine-grained control I was ideally imagining.

Pity only the online version is free, an OSS standalone app (not Java - gumph!) would be preferable as SQL is not exactly a main focus of my work and I can't see me swinging even $30 past the bean counters just so I don't get a headache trying to fix their crummy reporting.

Any more?

Edit 2: Oops, seems this has been asked before. I wasn't obviously searching for the right thing when I checked. Searching on the tool names, or via Google, brings up many similar questions - voted to close.

Upvotes: 1

Views: 493

Answers (4)

ahains
ahains

Reputation: 1912

I haven't tried it, but I see there is at least one SQuirreL plugin that mentions formatting. Free / open source / Java. http://www.squirrelsql.org/index.php?page=plugins

Upvotes: 0

Galwegian
Galwegian

Reputation: 42227

I've used SQLInform in the past with pretty good results - again it formats any SQL you paste in with reasonable accuracy.

Upvotes: 2

Patrick Cornelissen
Patrick Cornelissen

Reputation: 7958

I have use the oracle SQL Developer for this mainly. But this is not exactly lightweight. The MS-SQL-Server development UI is noce for this too. (I Think they work for different databases too).

Toad is another nice UI for this. (But not lightweight too)

Upvotes: 0

JohnOpincar
JohnOpincar

Reputation: 5813

I used this on in the past to make some ugly sql somewhat readable: http://www.dpriver.com/pp/sqlformat.htm

Upvotes: 2

Related Questions