I love how SqlInform allows me to format case when statements.
To make this even better, please specify that simple case when statements are formatted into one line.
Here is an example.
This sql:
select field_1 as my_field, case when field_1 = 'Snowflake' then 'Cloud' when field_2 = 'Oracle' then 'On-Premises' else 'Check' end as group_1, case when field_1 is null then 'Empty' else field_1 end as test2 from test
can be automaticly formattet as:
SELECT
field_1 AS my_field
,
CASE
WHEN field_1 = 'Snowflake'
THEN 'Cloud'
WHEN field_2 = 'Oracle'
THEN 'On-Premises'
ELSE 'Check'
END AS group_1
,
CASE
WHEN field_1 IS NULL
THEN 'Empty'
ELSE field_1
END AS test2
FROM test
but I would like it to be in this way:
SELECT
field_1 AS my_field
,
CASE
WHEN field_1 = 'Snowflake'
THEN 'Cloud'
WHEN field_2 = 'Oracle'
THEN 'On-Premises'
ELSE 'Check'
END AS group_1
,
CASE WHEN field_1 IS NULL THEN 'Empty' ELSE field_1 END AS test2
FROM test


