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: Database Triggers

Re: Database Triggers

From: Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK>
Date: Tue, 15 Jan 2002 14:17:50 GMT
Message-ID: <3c4439dd.629295547@news.alt.net>


On 14 Jan 2002 12:50:23 -0800, dgray_at_fytek.com (Darren Gray) wrote:

>I need some help. I have a database trigger that updates a 'History'
>table when ever anyone updates a given table.
>
>Here is the trigger:
>
>TRIGGER UPDATE_PD_BRANCH
> AFTER INSERT OR UPDATE ON PD_BRANCH
> FOR EACH ROW
>BEGIN
> UPDATE_PD_MAIN_HIST (:NEW.ACCOUNT, 'PD_BRANCH', USER , SYSDATE);
>END;
>
>Pretty basic. Now, here's my issue: I really only want this trigger
>to fire if it was caused by running certain programs. Meaning, we
>have 'global' update programs that will generate thousands of rows in
>the 'PD_MAIN_HIST' table and it's data that we don't really need nor
>want. So, does anyone know of a way around this problem? Other than
>moving the trigger to the Form?
>
>Thanks,
>Darren Gray
>dgray_at_fytek.com

Does the 'global update' have a specific username? Does it do anything differently? The WHEN clause of a TRIGGER may come in handy.

Brian Received on Tue Jan 15 2002 - 08:17:50 CST

Original text of this message

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