SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Stored Procedure
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mketron
Starting Member

4 Posts

Posted - 06/12/2007 :  16:24:03  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
3575 Posts

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



-ec
Go to Top of Page

rmiao
Flowing Fount of Yak Knowledge

USA
7266 Posts

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

mketron
Starting Member

4 Posts

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

eyechart
Flowing Fount of Yak Knowledge

USA
3575 Posts

Posted - 06/14/2007 :  13:45:08  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000