Synchronize record in another table after record is updated?

Synchronize record in another table after record is updated?

Post by Tim Burblehof » Sat, 31 Jan 2004 01:27:27



How is this done? I need to be able to do this for specific records only..
so if record A in table 1 gets updated, record A in table 2 gets the same
update also.

Thanks

 
 
 

Synchronize record in another table after record is updated?

Post by Narasimhan Jayachandra » Sat, 31 Jan 2004 01:56:12


You can do it by one way through triggers.

Naras.

 
 
 

Synchronize record in another table after record is updated?

Post by Joe Celk » Sat, 31 Jan 2004 02:42:15


Quote:>> ... if record A [sic] in table 1 gets updated, record A [sic] in

table 2 gets the same update also. <<

Look up DRI actions in BOL and set up an ON UPDATE CASCADE action.  

Rows are note records; columns are not fields and tables are not files.
If you were not thinking in terms of a file system, you'd know that the
"unit of work" in SQL is the **schema**, not the table (file).  You
would see tables one and two as part of a whole and you would look for
mechanism to maintain a relationship between them.  

The worst way would be to use a trigger.  They give no help to the
optimizer and the code is highly proprietary as well as procedural.  

--CELKO--
 ===========================
 Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

Synchronize record in another table after record is updated?

Post by <anonym.. » Sat, 31 Jan 2004 05:00:24


Use replication if the databases are diffrent.
Transactional Replication will solve the problem with
filter.

Best regards
NIITMALAD

Quote:>-----Original Message-----
>How is this done? I need to be able to do this for

specific records only..
Quote:>so if record A in table 1 gets updated, record A in

table 2 gets the same
Quote:>update also.

>Thanks

>.