CREATE TRIGGER trgPFPAmountLog
ON [dbo].[t_PfpAmount]  
AFTER DELETE 
AS 
      INSERT INTO t_PfpAmount_Log
      (
            LocationID,[Month],[Year],
            EmpID,PFPAmount,[System],
            CreatedBy,CreatedOn,
            DBLoginName,SystemIP
      )  
     
      SELECT
                  LocationID,[Month],[Year],
                  EmpID,PFPAmount,[System],CreatedBy,
                  CreatedOn,SYSTEM_USER ,HOST_NAME()
      FROM deleted

Comments (0)