The formatter does not work on some compound triggers.
To reproduce the issue please follow the steps before (scott schema required).
1) Log in to an 11.2 database
2) Open a SQL editor and paste the following trigger
CREATE OR REPLACE TRIGGER test_compound FOR
INSERT OR UPDATE
ON scott.emp
REFERENCING NEW AS new OLD AS old WHEN (NEW.empno = 0 OR NEW.empno= -1)
COMPOUND TRIGGER
BEFORE EACH ROW
IS
BEGIN
null;
END BEFORE EACH ROW;
END test_compound;
/
3) Format the code. You will get the error message :"[Error] Syntax check (5: 40): ERROR line 5, col 40, ending_line 5, ending_col 43, Found 'WHEN', Expecting: COMPOUND -or- DISABLE ENABLE -or- FOLLOWS -or- CROSSEDITION FORWARD REVERSE"
4) Press F9 :the trigger is compiled without errors so the code is correct. The formatter should not complain about the code.
,
You need to be signed in and under a current maintenance contract to view premium knowledge articles.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center