Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> 7813 trigger tribulations
Ahhhh - im having a heap of trouble. (bear with me - im a virgin trigger
writer !!)
Im trying to write a trigger on INSERT such that the insert will be cancelled should a reecord satisfying certain conditions exist:
CREATE OR REPLACE TRIGGER
BEFORE INSERT FR_COMMON_DETAILS
FOR EACH ROW
BEGIN
IF ((SELECT COUNT(*) FROM FR_COMMON_DETAILS WHERE ......) = 0) then
return true; *****
ELSE
return false; *****
END IF;
END;
***** basically i dont know what to return here such that the insert will be
cancelled or to permit it to go ahead??? Im not even sure how to return or if
there is a form of return. How do I correctly write the lines marked with
*****.
Any help greatly appreciated.
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Jan 21 1999 - 13:58:15 CST