Quantcast
Channel: Rss Feed - SSMSBoost Add-in discussion board - Forum
Viewing all articles
Browse latest Browse all 825

Formatter - CASE statements

$
0
0
It seems the formatter also needs a little love in the CASE statements.

I'm trying to format the following statement as shown below (with some indentation though that even if the forum permits it, i don't know how to do it - it might be helpful to have a way to type a "fixed font" in posts)

Quote:
CASE WHEN Field1 BETWEEN 10 AND 20
THEN Field1
ELSE Field2
END AS MyField


There is a missing "SpaceBeforeElse" option in the formatter, so if you use "SpaceBeforeThen"="LineBreak" and everything else "Space", you end up having the "ELSE" part in the same line with "THEN" and the "WHEN" part aligned with ELSE (which puts it way to the right if the "THEN" part in the 2nd line is big).

Quote:
CASE <several spaces> WHEN Field1 BETWEEN 10 AND 20
THEN Field1 ELSE Field2
END AS MyField


Bottom line: please add a "SpaceBeforeElse" option in the formatter.

P.S.: It might also be nice to add an "IndentEnd" option.
Go to last post

Viewing all articles
Browse latest Browse all 825

Trending Articles