Hi I tested the Refactor function where you can let TOAD (126.96.36.199 for Oracle) convert decode-statements into CASE statements.
Luckily I did some testing before production and I found errors in the converted code.
select decode(:var,null,‘Nothing’,‘Value’) from dual
If :var is null, the the result should be ‘Nothing’
TOAD converted this into : SELECT CASE WHEN :var = NULL THEN ‘nothing’ ELSE ‘Value’ END FROM DUAL;
The clause “WHEN :var = NULL” will always return ‘Value’ even if :var is null. The correct syntax should be “WHEN :var is NULL”.