I am trying to get the formatter to keep the 'THEN' condition on the same line of the 'WHEN' for short statements when using the PL/SQL version of the 'CASE' statement. The statement below (desired format):
CASE lc_loc
WHEN 'AIN01_E' THEN lc_loc := 'AIN03_E';
WHEN 'AIN03_E' THEN lc_loc := 'AIN02_E';
WHEN 'AIN02_E' THEN lc_loc := 'AIN04_E';
WHEN 'AIN04_E' THEN lc_loc := 'AIN01_E';
END CASE;
Is changed by the formatter to:
CASE lc_loc
WHEN 'AIN01_E' THEN
lc_loc := 'AIN03_E';
WHEN 'AIN03_E' THEN
lc_loc := 'AIN02_E';
WHEN 'AIN02_E' THEN
lc_loc := 'AIN04_E';
WHEN 'AIN04_E' THEN
lc_loc := 'AIN01_E';
END CASE;
'Allow half expanded' is checked on the CASE Expressions window.
Formatting is working as desired for SQL:
SELECT CASE vendor_name
WHEN 'Caterpillar' THEN 'Internal'
WHEN 'Caterpillar' THEN 'Internal'
WHEN 'Caterpillar' THEN 'Internal'
WHEN 'Caterpillar' THEN 'Internal'
WHEN 'Caterpillar' THEN 'Internal'
ELSE vendor_name
END
FROM po_vendors
You need to be signed in and under a current maintenance contract to view premium knowledge articles.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center