Re: OLD and NEW in DB TRIGGERS

From: Enid/Ed Kammin <ekammin_at_frontiernet.net>
Date: 1996/04/15
Message-ID: <317303EC.6208_at_frontiernet.net>#1/1


Kevin Merritt wrote:
>
> There's a lot of "press" advocating converting DB triggers to stored
> procedures when the trigger exceeds 60 lines of code. This is all well
> and good, but how can I have access to the correlation rows OLD and NEW
> in my stored procedure? I want to see the before and after values from
> inside my stored procedure.
>
> For example, in my DB trigger I want to call my stored procedure
>
> CREATE TRIGGER xxx
> AFTER UPDATE
> ON TABLE_YYY
> REFERENCING OLD AS OLD NEW AS NEW
> FOR EACH ROW
> DECLARE
> BEGIN
> XXX_TRG_STORPROC(old, new);
> END;
>
> Any bright ideas would be appreciated.Pass these values as parameters to your stored procedure, i.e.,
new.column_name, old.column_name, etc. Received on Mon Apr 15 1996 - 00:00:00 CEST

Original text of this message