Getting a formatter error when trying to format text case with 2 identical value.
See example below:
DECLARE
grade CHAR(1);
BEGIN
grade := 'B';
CASE grade
WHEN 'A' THEN DBMS_OUTPUT.PUT_LINE('Excellent');
WHEN 'A' THEN DBMS_OUTPUT.PUT_LINE('Very Good');
WHEN 'C' THEN DBMS_OUTPUT.PUT_LINE('Good');
WHEN 'D' THEN DBMS_OUTPUT.PUT_LINE('Fair');
WHEN 'F' THEN DBMS_OUTPUT.PUT_LINE('Poor');
ELSE DBMS_OUTPUT.PUT_LINE('No such grade');
END CASE;
END;
/
When trying to format the code it says :15:31:25 ERROR line 8, col 5, ending_line 8, ending_col 52: Duplicated case entry found: 'A'
The problem is that piece of code:
WHEN 'A' THEN DBMS_OUTPUT.PUT_LINE('Excellent');
WHEN 'A' THEN DBMS_OUTPUT.PUT_LINE('Very Good');
© ALL RIGHTS RESERVED. Feedback 이용 약관 개인정보 보호정책 Cookie Preference Center