Instead of Update Trigger SQL Server 2000
Posted on 2004-03-24
This is what I'm trying to do:
I have a table in which I update a record. Simplified version of what I'm trying to do:
Date Start: 2004/01/01
Date End: 2004/12/31
Record Sequence Number: 1
Product Purchased: Apples
Date Purchased: 2004/02/01
Somone comes along and decided that the prices of apples should only be $13. I want to reverse all records. In other words insert a sequence number 2 with the old rate negated and then insert a sequence 3 with the new rate. This will allow George to get a credit of $2.
I get this error message on my trigger. The table I'm doing the update on has a master table one level above it with cascaded delete and updates. It does not have any child tables.
Error 2113: Cannot CREATE INSTEAD OF DELETE or UPDATE TRIGGER becuase the table has a FOREIGN KEY with cascaded DELTE or UPDATE