title: SQL Trigger
body: <p>I have the attached trigger that runs if the <code>tbl_repair_visit.TENANTSATISFACTION = 'Poor'</code> on an update.</p>
  
  <p>The issue i have if we change the engineers name the Engineer column gets updated and the trigger runs again if <code>TENANTSATISFACTION = 'Poor'</code></p>
  
  <p>How can i set this up to only run if the <code>TENANTSATISFACTION = 'Poor'</code> column is updated and ignor updates on all other columns</p>
  
  <pre><code>ALTER TRIGGER [dbo].[tr_CustomerSatisfactionAlertRepair] 
      ON [dbo].[tbl_repair_visit] 
  AFTER UPDATE
  AS 
  BEGIN
      SET NOCOUNT ON;
      INSERT alertmessagedata (TypeID, Contract, Address, ORDERID, 
                  ENGINEERS, Sent, DateAdded)
      SELECT '5', tbl_property.contract, tbl_property.fulladdress, 
              tbl_repair_visit.orderid, tbl_repair_visit.engineer, 
              0, GETDATE()
      FROM TBL_REPAIR_VISIT 
      INNER JOIN
          INSERTED X ON TBL_REPAIR_VISIT.VISITID = X.VISITID 
      INNER JOIN 
          TBL_PROPERTY ON TBL_REPAIR_VISIT.PROPREF = TBL_PROPERTY.PROPREF
      WHERE tbl_repair_visit.TENANTSATISFACTION = 'Poor'
  END
  </code></pre>