SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE TRIGGER [dbo].[AccFactor_LastUpdate]
ON [dbo].[AccFactor] FOR UPDATE 
	AS
	if not (UPDATE(UpdateDate))
		update AccFactor set UpdateDate=getdate() where id in (select id from inserted)

     	--update AppSetting set TheValue = dbo.StrDate(getdate()) where [Name]='AccFactorLastUpdate'
	return