Toad v17.1.717.3711
DECLARE
num CONSTANT NUMBER
:= CASE 1
WHEN 1 THEN 1
WHEN 1 THEN 1
WHEN 1 THEN 1
WHEN 1 THEN 1
WHEN 1 THEN 1
WHEN 1 THEN 1
WHEN 1 THEN 1
WHEN 1 THEN 1
WHEN 1 THEN 1
WHEN 1 THEN 1
WHEN 1 THEN 1
WHEN 1 THEN 1
ELSE 0
END ;
num2 CONSTANT NUMBER
:= CASE 1 WHEN 1 THEN 1 --
WHEN 1 THEN 1 --
WHEN 1 THEN 1 --
WHEN 1 THEN 1 --
WHEN 1 THEN 1 --
WHEN 1 THEN 1 --
WHEN 1 THEN 1 --
WHEN 1 THEN 1 --
WHEN 1 THEN 1 --
WHEN 1 THEN 1 --
WHEN 1 THEN 1 --
ELSE 0 END ;
BEGIN
NULL;
END;
If I use auto format for the above a space gets added for some reason after the CASE END. The same issue happens with a shorter one as well but where the WHENs doesn't line up. Doesn't seem to happen outside the declare section. The specific length where this happens probably depends on the formatting max width (180 for me).
<FormatterOptions>
<Version>397</Version>
<LegacyOptionsGUI>5.397.0</LegacyOptionsGUI>
<QP5>5.404</QP5>
<OutputTabs>2</OutputTabs>
<IndentSize>2</IndentSize>
<RightMargin>180</RightMargin>
<AssignFavorWrapping>0</AssignFavorWrapping>
<CommentsRightJustifyTrailing>0</CommentsRightJustifyTrailing>
<CommentsRightJustifyLineComment>0</CommentsRightJustifyLineComment>
<ExprArrangeOnCol>99</ExprArrangeOnCol>
<DmlColumnAliasAlignment>0</DmlColumnAliasAlignment>
<DmlTableRefAliasAlignment>0</DmlTableRefAliasAlignment>
<Tagline>0</Tagline>
</FormatterOptions>