Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> 7813 trigger tribulations

7813 trigger tribulations

From: <krose_at_athena.nwafc.nf.ca>
Date: Thu, 21 Jan 1999 19:58:15 GMT
Message-ID: <7880sh$4fa$1@nnrp1.dejanews.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US