[dba-SQLServer] Triggers To Update A Table When Another Table Has A Record Inserted

paul.hartland at fsmail.net paul.hartland at fsmail.net
Fri Apr 2 08:16:36 CST 2004


To all,
 
Just starting to play about with Triggers, what I want to do is create a Trigger for a table called tblPersonnel so that when someone adds a new record to the table, the Trigger Executes a stored procedure that updates a table called tblDataChanges with the PayrollNo, DateAdded, Firstname & Surname.
 
Has anyone got any sample code to create this Trigger, I have the Stored Procedure to update the tblDataChanges with the Parameters @Payroll, @DateAdded, @Firstname & @Surname.
 
Thanks in advance for any help on this.
 
Paul Hartland
Freeserve AnyTime - HALF PRICE for the first 3 months - Save £7.50 a month 
www.freeserve.com/anytime


More information about the dba-SQLServer mailing list