mikemenne
Member
It would be nice to have options for separate formatting of CASE statements. Currently they seem to format along with the line options of a query.
I did some searching and didn't find anything that seemed to address so hopefully this isn't a duplicate request.
Using the --noformat start and --noformat end thing works but it would be nice as a config option instead.
Ie. I'm proposing this be possible
SELECT col1
,col2
,col3
--noformat start
,case when col1 ='x' then 'y' else 'z' end as col 4
,case when col2 ='x' then 'y' else 'z' end as col 5
,case when col3 ='x' then 'y' else 'z' end as col 6
--noformat end
FROM dual;
Instead of my current result which is more like this :-(
SELECT col1
,col2
,col3
,CASE
WHEN col1 = 'x' THEN
'y'
ELSE
'z'
END AS col 4
,CASE
WHEN col2 = 'x' THEN
'y'
ELSE
'z'
END AS col 5
,CASE
WHEN col3 = 'x' THEN
'y'
ELSE
'z'
END AS col 6
FROM dual;
Mike
I did some searching and didn't find anything that seemed to address so hopefully this isn't a duplicate request.
Using the --noformat start and --noformat end thing works but it would be nice as a config option instead.
Ie. I'm proposing this be possible

SELECT col1
,col2
,col3
--noformat start
,case when col1 ='x' then 'y' else 'z' end as col 4
,case when col2 ='x' then 'y' else 'z' end as col 5
,case when col3 ='x' then 'y' else 'z' end as col 6
--noformat end
FROM dual;
Instead of my current result which is more like this :-(
SELECT col1
,col2
,col3
,CASE
WHEN col1 = 'x' THEN
'y'
ELSE
'z'
END AS col 4
,CASE
WHEN col2 = 'x' THEN
'y'
ELSE
'z'
END AS col 5
,CASE
WHEN col3 = 'x' THEN
'y'
ELSE
'z'
END AS col 6
FROM dual;
Mike