Toad World® Forums

Toad Formatter Multiple Join Conditions "=" vertical alignment ; Case statement vertical alignment

Hello,

I have two questions regarding easy vertical readability. I am using toad for oracle 12.0.1, I can upgrade to 12.7.

1.Toad Formatter Multiple Join Conditions “=” vertical alignment

Is there a way to vertically align = operator for multiple AND lines?

Current Format

SELECT *
FROM table1 a, table2 b
WHERE a.col1 = b.col1
AND a.col999 = b.col999
AND a.col999999 = b.col999999

Desired Format

SELECT *
FROM table1 a, table2 b
WHERE a.col1 = b.col1
AND a.col999 = b.col999
AND a.col999999 = b.col999999

1.Can we vertically align THEN values of Case statement ?

Current Format

SELECT CASE
WHEN a.col5 = b.col5 THEN 'COL5’
WHEN a.col55555555555555 = b.col5 THEN 'COL55555’
WHEN a.col555555 = b.col5 THEN 'COL555555’
WHEN a.col55555555 = b.col5 THEN 'COL5555555’
END AS VAL
FROM table1 a, table2 b
WHERE a.col1 = b.col1
AND a.col999 = b.col999
AND a.col999999 = b.col999999

Desired Format

SELECT CASE
WHEN a.col5 = b.col5 THEN 'COL5’
WHEN a.col55555555555555 = b.col5 THEN 'COL55555’
WHEN a.col555555 = b.col5 THEN 'COL555555’
WHEN a.col55555555 = b.col5 THEN 'COL5555555’
END AS VAL
FROM table1 a, table2 b
WHERE a.col1 = b.col1
AND a.col999 = b.col999
AND a.col999999 = b.col999999

Help is appreciated.

Thanks,

G.