gFmtOpt.CaseWhenThenInSameLine | Type: boolean | Default: false |
gFmtOpt.Indent_CaseFromSwitch | Type: Integer | Default: 2 |
gFmtOpt.Indent_Case_Then | Type: Integer | Default: 0 |
Example format options:
Name | Value |
gFmtOpt.CaseWhenThenInSameLine | false |
gFmtOpt.Indent_CaseFromSwitch | 2 |
Formatted SQL:
SELECT productnumber,
name,
'Price Range' = CASE
WHEN listprice = 0
THEN 'Mfg item - not for resale'
WHEN listprice < 50
THEN 'Under $50'
WHEN listprice >= 50
AND listprice < 250
THEN 'Under $250'
WHEN listprice >= 250
AND listprice < 1000
THEN 'Under $1000'
ELSE 'Over $1000'
END
FROM production.product
ORDER BY productnumber;
Example format options:
Name | Value |
gFmtOpt.CaseWhenThenInSameLine | true |
gFmtOpt.Indent_CaseFromSwitch | 4 |
Formatted SQL:
SELECT productnumber,
name,
'Price Range' = CASE
WHEN listprice = 0 THEN 'Mfg item - not for resale'
WHEN listprice < 50 THEN 'Under $50'
WHEN listprice >= 50
AND listprice < 250 THEN 'Under $250'
WHEN listprice >= 250
AND listprice < 1000 THEN 'Under $1000'
ELSE 'Over $1000'
END
FROM production.product
ORDER BY productnumber;