PL/SQL Beautifier

raam94

Member
Hi All,
I would like to understand how to format correctly the CASE Expression with PL/SQL Beautifier.
Now when I use it, I have this behaviour:
CASE
WHEN ... THEN
1
WHEN .... THEN
2
I would like to have the value after then in single row:
CASE
WHEN ... THEN 1
WHEN .... THEN 2
I tried to change the files rules many time without success.
Can anyone help me?

Thank you very much
 
Marco Kalter said:
Can you include the complete statement?
Sure, thanks

Version=1
RightMargin=200
Indent=3
UseTabCharacter=FALSE
TabCharacterSize=2
AlignDeclarationGroups=TRUE
AlignAssignmentGroups=TRUE
KeywordCase=1
IdentifierCase=2
UseSpecialCase=TRUE
ItemList.Format=1
ItemList.Align=TRUE
ItemList.CommaAfter=TRUE
ItemList.AtLeftMargin=FALSE
EmptyLines=1
ThenOnNewLine=FALSE
LoopOnNewLine=TRUE
DML.LeftAlignKeywords=FALSE
DML.LeftAlignItems=FALSE
DML.OnOneLineIfPossible=TRUE
DML.WhereSplitAndOr=TRUE
DML.WhereAndOrAfterExpression=FALSE
DML.WhereAndOrUnderWhere=TRUE
DML.JoinSplitBeforeOn=TRUE
DML.InsertItemList.Format=2
DML.InsertItemList.Align=FALSE
DML.InsertItemList.CommaAfter=TRUE
DML.InsertItemList.AtLeftMargin=FALSE
DML.SelectItemList.Format=2
DML.SelectItemList.Align=TRUE
DML.SelectItemList.CommaAfter=TRUE
DML.SelectItemList.AtLeftMargin=FALSE
DML.UpdateItemList.Format=2
DML.UpdateItemList.Align=TRUE
DML.UpdateItemList.CommaAfter=TRUE
DML.UpdateItemList.AtLeftMargin=FALSE
ParameterDeclarationList.Format=2
ParameterDeclarationList.Align=TRUE
ParameterDeclarationList.CommaAfter=TRUE
ParameterDeclarationList.AtLeftMargin=FALSE
RecordFieldList.Format=1
RecordFieldList.Align=TRUE
RecordFieldList.CommaAfter=TRUE
RecordFieldList.AtLeftMargin=FALSE
SplitAndOr=FALSE
AndOrAfterExpression=FALSE
[SpecialCase]
ThenValueOnSameLine=TRUE
 
SELECT

CASE
WHEN caus = 11 THEN 1
WHEN caus = 12 THEN 2
ELSE caus END caus ,
SUM(numero) numero,
SUM(importo) importo
FROM TAB
 
This is indeed not possible. The beautifier will place each case on a separately indented line. I have added this to the list of enhancement requests.
 
Back
Top