Maybe I'm missing something bu8t why can't you check for master table record existence before performing update in the child table trigger?
>I have tables master - PurchaseInvoices and child - PurchaseInvoiceDetails. I have trigger in PurchaseInvoiceDetails that would update stock qty based on Location code stored in master table - PurchaseInvoices upon INSERT/UPDATE/DELETE.
>
>I also set table RI to have cascade delete. I faced problem that, when I delete record in master table, it would cascade delete child table. Trigger in child table fired and try to update stock qty. However, in this case, trigger unable to locate master table record anymore.
>
>How to overcome this? I can't move my stock update code to other place since I got to update stock if any changes happen to child table.
>
>Please advice.
>
>Thank you
--sb--