halting an oracle trigger
707939Dec 7 2009 — edited Dec 12 2009greetings.
does anyone know of a way that i can exit a trigger with one statement.
i have code in the following structure:
------------------------------------------------------------------------------------------------
begin
IF <condition true> THEN
{NEED TO EXIT THE TRIGGER HERE}
END IF;
RAISE_APPLICATION_ERROR(-20000, 'Record Locked - Cannot Be Updated');
END;
------------------------------------------------------------------------------------------------
i realize that the obvious solution is to put the RAISE_APPLICATION_ERROR into the else clause and be done with it, but the front-end application that I'm developing against doesn't properly handle application errors thrown from inside IF blocks (don't ask me why, its a third party item i have no control over, but have a growing annoyance for).
i know that a statement to exit a trigger should never be needed, but i'm hoping it exists before looking for alternate solutions.
thanks in advance.
matt
Edited by: user6388889 on Dec 7, 2009 1:43 AM