HumanResources.uEmployeePayHistory Trigger
Information
| Name | HumanResources.uEmployeePayHistory |
| Table Name | HumanResources.EmployeePayHistory |
| Created | 14.10.2005. 1:59:52 |
| Modified | 2.7.2009. 10:35:10 |
| 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;