== Why is this an issue? When a single primitive is tested against three or more values in an ``++IF++``, ``++ELSIF++`` chain, it should be converted to a ``++CASE++`` instead for greater readability. === Noncompliant code example [source,sql] ---- DECLARE x PLS_INTEGER := 0; BEGIN IF x = 0 THEN -- Noncompliant DBMS_OUTPUT.PUT_LINE('x = 0'); ELSIF x = 1 THEN DBMS_OUTPUT.PUT_LINE('x = 1'); ELSE DBMS_OUTPUT.PUT_LINE('x > 1'); END IF; END; / ---- === Compliant solution [source,sql] ---- DECLARE x PLS_INTEGER := 0; BEGIN CASE x WHEN 0 THEN DBMS_OUTPUT.PUT_LINE('x = 0'); WHEN 1 THEN DBMS_OUTPUT.PUT_LINE('x = 1'); ELSE DBMS_OUTPUT.PUT_LINE('x > 1'); END CASE; END; / ---- ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) === Message Convert this "IF/ELSIF" structure into a "CASE". ''' == Comments And Links (visible only on this page) include::../comments-and-links.adoc[] endif::env-github,rspecator-view[]