Trigger Help

  • 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 .

  • 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 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply