Hello, I need test a condition in before_trigger and then in some cases stop execution and return a application error code, like :
create trigger Docs_BD before delete on Docs for each row
DECLARE aCnt integer;
SET aCnt = SELECT count(*) FROM Items where ID = Old.ID;
IF IfNull(aCnt,0) <> 0 THEN
SET @ErrMsg = 528; -- Application error -- Error528: Cant delete document with items;
-- HOW STOP THE TRIGGER ? ---
Any suggestion ?
November 02, 2005 09:43AM
November 04, 2005 09:33AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.