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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -