One more trigger question

From: The Magnet <>
Date: Tue, 8 Sep 2009 12:51:51 -0700 (PDT)
Message-ID: <>

Ok, this one represents a dumb setup by the client. The client has a table which holds which email product(s) his customers get. Call this table 'ACTIVE':


PRODUCT_ID They also have a history table which shows all the opt outs and opt ins. Call this table INACTIVE:


SOURCE The SOURCE column identifies where the opt out came from. AOL, HOTMAIL, In House, etc. Problem is that the active & history tables are not in sync and do not properly reflect the activities. The system is way to big to put in fixes. So I figured a trigger on the ACTIVE table and start recording to a new history table. The active table is correct, just not the history table. A trigger will make sure every change to the active table is recorded.

Problem being that the SOURCE column does not come into account when dealing with the ACTIVE table. So, I do not think a trigger works on the ACTIVE table as you cannot just pass values using a trigger.

So problem being, how to put a trigger on the active table such that when a DELETE occurs we can properly record the SOURCE in the history table. The trigger will ensure the history is recorded properly.

Dumb, very dumb. Not even sure INSTEAD OF triggers will work here..... Received on Tue Sep 08 2009 - 14:51:51 CDT

Original text of this message