I am a bit of a novice at SQL Server 7.0, and my attempts to write a cascade trigger that actually works have been fruitless.
I need to insert a new record with the identical value in MyTable2 every time a new unique id is generated in MyTable1 for column customer. For e.g. unique id with value 4 in column customer, is automatically generated when a new row is created in MyTable1. Simultaneously that record with a value of 4 for column customer2 should be entered in MyTable2.
I also need to ensure that MyTable2 locks and releases correctly to match a new insert in MyTable1 so we have matching increments in both tables. Can someone please show me the code for this. Thanks for all your help.
I need to insert a new record with the identical value in MyTable2 every time a new unique id is generated in MyTable1 for column customer. For e.g. unique id with value 4 in column customer, is automatically generated when a new row is created in MyTable1. Simultaneously that record with a value of 4 for column customer2 should be entered in MyTable2.
I also need to ensure that MyTable2 locks and releases correctly to match a new insert in MyTable1 so we have matching increments in both tables. Can someone please show me the code for this. Thanks for all your help.