Toad World® Forums

Toad Data Point Custom Sql Formatter

Hi Everyone,

I was wondering if you might be so kind as to take a look at the section within the Custom SQL Formatter (Tools -> Options). It’s been really buggy for as long as I can remember. I’m on the current version 4.2.1 and it has these problems under Windows 7. You can’t click on the + and - tree view icons, as they don’t expand and collapse correctly. You have to click above & below and really mess with it to get it to work. Go ahead and try it and I think you’ll see the same thing. Also there needs to be a vertical scroll bar in that left pane. Thanks for checking it out. Also, it would be really nice to have a super compact way to view the SQL so that it doesn’t look so messy. Example of clean & compact formatting, without having single keywords on their own lines:

Select count(*) as Cnt,Col1, Col2, Col3, Col4, Col5, Col6
from database.table
where Col1 = ‘x’ and Col2 = ‘Y’ and Col3 = ‘Z’
Group by Col1, Col2, Col3, Col4, Col5, Col6
Order by Col1, Col2, Col3;

Thanks,
Paul

When you are using your editor in Data Point, you will see an icon that looks like a paint can with a drip. Press this icon and it will reformat your code for you.

I’m aware of that Armand. The results of the sql formatting AFTER clicking that button is far from what I’d like to see. I’m asking for a super compact way of presenting the SQL.

I want the SQL to look exactly like this:

Select count(*) as Cnt,Col1, Col2, Col3, Col4, Col5, Col6
from database.table
where Col1 = ‘x’ and Col2 = ‘Y’ and Col3 = ‘Z’
Group by Col1, Col2, Col3, Col4, Col5, Col6
Order by Col1, Col2, Col3;

and NOT like this:

SELECT COUNT (*) AS Cnt,
Col1,
Col2,
Col3,
Col4,
Col5,
Col6
FROM database. table
where Col1 = ‘x’ and Col2 = ‘Y’ and Col3 = ‘Z’
Group by Col1, Col2, Col3, Col4, Col5, Col6
Order by Col1, Col2, Col3;

I have tried every single format in there and none of them will accomplish this, as far as I can see.

Hi Paul,

You can use custom formatting.

Go to Tools|Options|Editor and change the following option and you should get your preferable formatting.

Regards

Aleksey