Toad World® Forums

Apply Auto Debugger and Update Statements

What's up with the Apply Auto Debugger and UPDATE statements? I think this has been happening for a few releases. It's just annoyed me enough now to post a small repeatable test case. It will not compile with the embedded DBMS_OUTPUTs in the UPDATE statement.

CREATE OR REPLACE TRIGGER cost.zzzzzz
BEFORE INSERT OR UPDATE
ON alloc_sabrs_tran
REFERENCING OLD AS old NEW AS new
FOR EACH ROW
DECLARE
BEGIN
UPDATE sabrs_ala_xfer_src
SET status_cd = 'E'
WHERE source_sys_id = :new.source_sys_id;
END;
/

CREATE OR REPLACE TRIGGER cost.zzzzzz
   BEFORE INSERT OR UPDATE
   ON  alloc_sabrs_tran
   REFERENCING OLD AS old NEW AS new
   FOR EACH ROW
DECLARE
BEGIN
-- <Toad_182778523_1> *** DO NOT REMOVE THE AUTO DEBUGGER START/END TAGS
DBMS_OUTPUT.PUT_LINE('{Toad_182778523_1}');
DBMS_OUTPUT.PUT_LINE('{Toad_182778523_1}[--- 1 ---]');
DBMS_OUTPUT.PUT_LINE('{Toad_182778523_1}');
-- </Toad_182778523_1>
   UPDATE sabrs_ala_xfer_src
      SET status_cd = 'E'
-- <Toad_182778523_2> *** DO NOT REMOVE THE AUTO DEBUGGER START/END TAGS
DBMS_OUTPUT.PUT_LINE('{Toad_182778523_2}');
DBMS_OUTPUT.PUT_LINE('{Toad_182778523_2}[--- 2 ---]');
DBMS_OUTPUT.PUT_LINE('{Toad_182778523_2}');
-- </Toad_182778523_2>
    WHERE source_sys_id = :new.source_sys_id;
-- <Toad_182778523_3> *** DO NOT REMOVE THE AUTO DEBUGGER START/END TAGS
DBMS_OUTPUT.PUT_LINE('{Toad_182778523_3}');
DBMS_OUTPUT.PUT_LINE('{Toad_182778523_3}[--- 3 ---]');
DBMS_OUTPUT.PUT_LINE('{Toad_182778523_3}');
-- </Toad_182778523_3>
END;
/