CASE statement in PL/SQL Beautifier

Joe Simunac

Member²
There seems to be a problem with beautifying the CASE statement in certain cases. Here is my example:

Code:
update tabname
set code1 = case code2 when '5' then '1' when '6' then '2' else '3' end;
I think this should display as:

Code:
update tabname
set code1 = case code2
               when '5' then '1'
               when '6' then '2'
               else '3'
               end;
However, it currently displays all on one line. I've played with the beautifier options, but nothing works for CASE.

Even CASE in a SELECT statement is not totally correct. Here's how it currently looks:

Code:
select code1,
       case code2
          when '5' then
            '2'
          when '6' then
            '2'
          else '3'
          end
from tabname
I would like at least the option of keeping the when-then statements on one line. Is this on the list for a future version? Is it available now and I just can't find it?

Thanks for any advice.

-Joe
 
in-line case statements still don't appear to be working. This is produced:

Code:
myfunction(parm => case code2 when '5' then '1' when '6' then '2' else '3' end);
where I would expect to see something like:

Code:
myfunction(parm => case code2
                     when '5' then '1'
                     when '6' then '2'
                     else '3'
                   end);
John
 
Back
Top