rules repository

G-4220 – Try to use CASE rather than DECODE.

`decode` is an Oracle Database specific function hard to understand and restricted to SQL only. The “newer” `case` function is much more common, has a better readability and may be used within PL/SQL too. Be careful that `decode` can handle `null` values, which the simple `case` cannot - for such cases you must use the searched `case` and `is null` instead.

Tags: Control.

Quality area: Maintainability. Severity: Major. Fixing time: Local-medium.

No rule selected