Toad Formatter Plus is formatting ANSI syntax in a confusing pyramid structure. I cannot get it aligned into one line.
How Toad is Formatting the SQL now:
SELECT b.*
FROM rso_pitem_9999 a
JOIN
rso_pitem_9999_map b
ON (a.asset_id = b.asset_id)
JOIN
esearch.rso_attachments att
ON (b.item_id = att.item_id)
LEFT OUTER JOIN
esearch.box_descriptions2 box
ON (b.item_id = box.item_id)
LEFT OUTER JOIN
esearch.cop_box_descripti2 cop
ON (b.item_id = cop.item_id)
WHERE (box.item_id IS NOT NULL
OR cop.item_id IS NOT NULL);
How I would like it formatted:
SELECT b.*
FROM rso_pitem_9999 a
JOIN rso_pitem_9999_map b
ON (a.asset_id = b.asset_id)
JOIN esearch.rso_attachments att
ON (b.item_id = att.item_id)
LEFT OUTER JOIN esearch.box_descriptions2 box
ON (b.item_id = box.item_id)
LEFT OUTER JOIN esearch.cop_box_descripti2 cop
ON (b.item_id = cop.item_id)
WHERE (box.item_id IS NOT NULL
WORKAROUND:
Toad is not able to format code like how it is requested above, however please try the settings below.
Go to View | Formatter Options, and changed the following options:
1. Formatter Options | Operators & Punctuations | AND - OR | Style | choose "Stacked".
2. Formatter Options | Statements & Clauses | DML Statements | Query Options | checkmark "Stacked nested joins vertically (without indenting)".
3. Formatter Options | Statements & Clauses | Other Lists | under "Default" drop down list | choose "Stacked on Overflow of More than...".
Sample of the results from the above settings:
/* Formatted on 11/12/2008 11:23:48 AM (QP5 v5.115.810.9015) */
SELECT b.*
FROM rso_pitem_9999 a JOIN rso_pitem_9999_map b
ON (a.asset_id = b.asset_id)
JOIN esearch.rso_attachments att
ON (b.item_id = att.item_id)
LEFT OUTER JOIN esearch.box_descriptions2 box
ON (b.item_id = box.item_id)
LEFT OUTER JOIN esearch.cop_box_descripti2 cop
ON (b.item_id = cop.item_id)
WHERE (box.item_id IS NOT NULL
OR cop.item_id IS NOT NULL);
STATUS:
Enhancement request ST56547 has been submitted to Development for consideration in a future release of Toad for Oracle.
© 2021 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy