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
 Trigger

Author  Topic 

mketron
Starting Member

4 Posts

Posted - 2007-06-20 : 11:21:05
How would a build a trigger for this:

I have a table (UOM) in one database (purchasing). I need it to update a table (xUOM) in another database (accounting) whenever it is updated.

The whole table needs to be updated so they are the same in both databases.

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-20 : 11:39:58
Possible to use replication?
Go to Top of Page

mketron
Starting Member

4 Posts

Posted - 2007-06-21 : 13:44:06
I do not want to use replication.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-06-21 : 13:55:16
Why not just create a view in the accounting database that points to the UOM table in purchasing database? That way, the data is always the same.




CODO ERGO SUM
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-06-21 : 14:14:16
What about inserts and deletes?

Have you ever written a trigger before?

Read the hint link in my sig



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -