Synchronize record in another table after record is updated?

Synchronize record in another table after record is updated?

Post by Tim Burble » Sat, 31 Jan 2004 08: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 TmFyYXNpbW » Sat, 31 Jan 2004 08: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 09:42:15

>> ... 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.yqcomputer.com/ ***
Don't just participate in USENET...get rewarded for it!
 
 
 

Synchronize record in another table after record is updated?

Post by anonymou » Sat, 31 Jan 2004 12:00:24

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

Best regards
NIITMALAD
specific records only..
table 2 gets the same