Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Stored Procedure

Author  Topic 

mketron
Starting Member

4 Posts

Posted - 2007-06-12 : 16:24:03
I need to copy a table from one database to another one whenever it is updated. I have a stored procedure to do it but it does not run when the orginal table is updated. How do I trigger it to run on update?

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2007-06-12 : 16:33:22
"trigger" is the keyword there. Look triggers up in books online for more details (BOL).



-ec
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-12 : 20:27:13
Copy whole table with every update? Why don't use replication?
Go to Top of Page

mketron
Starting Member

4 Posts

Posted - 2007-06-14 : 13:02:53
What is the easiest way to tranfer the data upon update? Replication?
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2007-06-14 : 13:45:08
quote:
Originally posted by mketron

What is the easiest way to tranfer the data upon update? Replication?



you can use replication, but that is more complicated. look at triggers in BOL and start there. If you go the replication route, then you are using triggers with it anyway because replication uses triggers to do it's thing.



-ec
Go to Top of Page
   

- Advertisement -