Re: Question on Insert Trigger

From: Serge Rielau <srielau_at_ca.ibm.com>
Date: Fri, 07 Mar 2008 08:09:58 -0500
Message-ID: <63ct5eF26c99fU1@mid.individual.net>


zigzagdna_at_yahoo.com wrote:
> Thanks to all. not null in my code was just an example. My filtering
> logic is lot more complex and cannot implemented through a costraint.
> What I am asking is there a way to do filtering in the trigger if it
> cannot be done using EXCEPTIONS INTO statement.
Can you squeeze in a view? I.e. rename the table, create select-* view over the renamed table using the original table name. Then create an INSTEAD OF TRIGGER on the view to intercept the rows you don't like. You can ignore them, save them away, or patch them up.

Cheers
Serge

-- 
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Received on Fri Mar 07 2008 - 07:09:58 CST

Original text of this message