Check if field value updated on sql server trigger -
how can check field value updated in trigger:
alter trigger dbo.orderapprovedsms on dbo.[order] after update begin set nocount on; /*how can check approve date updated*/ if (/*approvedate updated*/) begin insert office.smssendbuffer ( number , body ) select 'xxxxxx','order approved!' end end
this simple ypu can use update function checking field value update.
alter trigger dbo.orderapprovedsms on dbo.[order] after update begin set nocount on; /*how can check approve date updated*/ if (update (approvedate)) begin insert office.smssendbuffer ( number , body ) select 'xxxxxx','order approved!' end end
Comments
Post a Comment