🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: bu.localpostings
1 messages
1 total messages Started by Thomas Dauria Tue, 28 Dec 1999 00:00
Using a trigger to cascade updates to another database( comp.databases.ms-sqlserver)
#337
Author: Thomas Dauria
Date: Tue, 28 Dec 1999 00:00
27 lines
1375 bytes
X-Orig-MsgId: <84b7a2$19v$1@news1.bu.edu>

I want to update a field in another database whenever I change the
value of people_id.  The other database name is SPH_Admissions and
the database containing this trigger is SPH_Resources and the table
name is tblPeople.  The table in SPH_Admissions that should be 
updated is called Names.

The syntax checker accepts the code below but when it executes it
complains that it can't find SPH_Admissions.Names

How do I reference it? 

Thanks in advance .... Tom

/*
 * CASCADE UPDATES TO 'Admissions Database Faculty Advisors 1'
 */
IF UPDATE(people_id)
    BEGIN
       UPDATE SPH_Admissions.Names
       SET SPH_Admissions.Names.Advisor1UID = inserted.people_id
       FROM SPH_Admissions.Names, deleted, inserted
       WHERE deleted.people_id = SPH_Admissions.Names.Advisor1UID
    END

/*
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads