August 16, 2002 at 11:58 am
My customer has two databases. what he wants to do is enter data in one database
and insert, update the data in other one .
Sqlserver 2000
database1 = mrp table = item fields = itemid , Description
database2 = wms table = item1 fields = itemid1 , Description1
can this be done with a trigger .
August 16, 2002 at 2:25 pm
Yes, it can.
Think of a trigger in this instance as a specialized stored procedure. Using a three-part naming convention, you can cross databases. An example of the three part naming convention:
SELECT * FROM Northwind.dbo.Customers
If you aren't already familiar with the special recordsets available in triggers, take a look at the information on {i]inserted and deleted[/i] in Books Online. You can use these special recordsets to get what the user inserted/changed.
K. Brian Kelley
http://www.truthsolutions.com/
Author: Start to Finish Guide to SQL Server Performance Monitoring
http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1
K. Brian Kelley
@kbriankelley
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy