TRIGGER PROBLEM
-
hi i have table1 (name[unique], address, phone) table2 (name[unique], occupation ) in my situation i am updating table2 name field value through procedure. so i want to create a trigger which change the relevant name field value of table1 using sql server 2000 please help me
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
-
hi i have table1 (name[unique], address, phone) table2 (name[unique], occupation ) in my situation i am updating table2 name field value through procedure. so i want to create a trigger which change the relevant name field value of table1 using sql server 2000 please help me
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
You can get the old value of the name from the deleted table and the new value of the name from the inserted record within your trigger. The deleted and inserted tables are special tables within a trigger, but if you are always updating using a stored prcoedure why not just update both atbles within a transaction. This will enaure referentail integrity too.
Bob Ashfield Consultants Ltd