It's probably lite because it's a matter of strategy.My suggestion...For every table, have a mirror history table. Make it identical...even the name, just add an _H to the end.Make sure all of your base tables have "data administration" columns.This to track who added a record and when, as well as updates.The history table should be identical except for three additional columns.Hist add by (the user who caused the event), the time of the event, and the action type (delete or update)No need to worry about the "after" event, it'll be the current resident in your base table.Here's a sample of the trigger:CREATE TRIGGER Company_UpdTr ON CompanyFOR UPDATE, DELETE ASIf Exists (Select 1 From Inserted) And Exists (Select 1 From Deleted) BEGIN Insert Into Company_H ( HIST_ADD_TYPE ,HIST_ADD_BY ,HIST_ADD_SYSUSER_BY ,Company_Name ,Active_Ind ,Psft_Company_Id ,FEIN ,Has_NonQual_Taxes ,Has_Qual_Taxes ,Created_By ,Created_Ts ,Updated_By ,Updated_Ts ) Select 'U' ,(Select Inserted.Updated_By from Inserted Where Deleted.Company_Name = Inserted.Company_Name) ,user ,Company_Name ,Active_Ind ,Psft_Company_Id ,FEIN ,Has_NonQual_Taxes ,Has_Qual_Taxes ,Created_By ,Created_Ts ,Updated_By ,Updated_Ts From Deleted ENDIf Not Exists (Select 1 From Inserted) And Exists (Select 1 From Deleted) BEGIN Insert Into Company_H ( HIST_ADD_TYPE ,HIST_ADD_BY ,HIST_ADD_SYSUSER_BY ,Company_Name ,Active_Ind ,Psft_Company_Id ,FEIN ,Has_NonQual_Taxes ,Has_Qual_Taxes ,Created_By ,Created_Ts ,Updated_By ,Updated_Ts ) Select 'D' ,user ,user ,Company_Name ,Active_Ind ,Psft_Company_Id ,FEIN ,Has_NonQual_Taxes ,Has_Qual_Taxes ,Created_By ,Created_Ts ,Updated_By ,Updated_Ts From Deleted END
Brett8-)