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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Overiding triggers!

Re: Overiding triggers!

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: Thu, 18 Feb 1999 12:30:13 +0800
Message-ID: <36CB9755.2DFF@bhp.com.au>


George wrote:
>
> Is it possible to stop a trigger from executing in certain situations.
> An example of why I would do this: An insert trigger assigns a sequence
> value to a field. However on some insert events I would like to assign a
> value from another source to this field.
>
> Thanks in advance
>
> George

Just use a package variable...

create or replace
package please_do is
  some_special_process boolean := true; null;

then in your trigger

if please_do.some_special_process then

    ...
else

    ...
end if;

Your application then sets the package variable as appropriate

HTH
--



Connor McDonald
BHP Information Technology
Perth, Western Australia
"Never wrestle a pig - you both get dirty and the pig likes it..." Received on Wed Feb 17 1999 - 22:30:13 CST

Original text of this message

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