Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Database Triggers
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