Toad World® Forums

Query Builder...way to auto-format the SQL


#1

Is there a way to cause the SQL to be formatted by the Formatter as it’s built while you are working on it?

I have upon ocassion a need to send the query to the Editor JUST to format it to see if it is valid or not. It would be nice to have the SQL shown in Toad auto-formatted by default.


#2

No, there is no way to have the SQL be auto-formatted in the Query Builder.
What is preventing you from reading it in the Query Builder Generated SQL pane? Is it because the text extends past the right margin and you have to do a lot of horizontal scrolling?


#3

Jeff,

The point for you is the syntax check, not the formatting, right? You want to make sure it’s valid SQL before executing it and getting an error?

Daniel


#4

Sometimes it’s hard to read. I would expect the formatter to be employed everywhere SQL is displayed. I shouldn’t have to send to the editor just to format it, esp if I want to do a quick copy/paste to another application.

Also, it’s possible to have the QB generate valid SQL that IT doesn’t think is valid. Sometimes if the formatter can format it, that’s a taletell that it’s OK to proceed.


#5

Would be nice to have that here. They have it in SQL Navigator and TOAD.


#6

test - delete me.