HumanResources.uEmployeePayHistory Trigger
Information
| Name | HumanResources.uEmployeePayHistory |
| Table Name | HumanResources.EmployeePayHistory |
| Created | 14.10.2005 1:59:52 |
| Modified | 24.9.2008 16:41:46 |
| Disabled |   |
| For replication |   |
| Instead of trigger |   |
| Activates on | UPDATE |
SQL Script
CREATE TRIGGER [HumanResources].[uEmployeePayHistory] ON [HumanResources].[EmployeePayHistory]
AFTER UPDATE NOT FOR REPLICATION AS
BEGIN
SET NOCOUNT ON;
UPDATE [HumanResources].[EmployeePayHistory]
SET [HumanResources].[EmployeePayHistory].[ModifiedDate] = GETDATE()
FROM inserted
WHERE inserted.[EmployeeID] = [HumanResources].[EmployeePayHistory].[EmployeeID]
AND inserted.[RateChangeDate] = [HumanResources].[EmployeePayHistory].[RateChangeDate];
END;