title: Trigger error microsoft sql server studio 2018
body: <pre><code>CREATE TRIGGER UpdateSafeBatch 
     ON  ClientService 
     AFTER UPDATE
  AS 
  BEGIN
      IF NEW.Closed != OLD.Closed THEN
          UPDATE SafeBatch SET SafeBatch.TotalVisa=SafeBatch.TotalVisa+ClientService.TotalVisa,
                       SafeBatch.TotalCash=SafeBatch.TotalCash+ClientService.TotalCash,
                       SafeBatch.Total=SafeBatch.Total+ClientService.Total,
          WHERE SafeBatch.Id=ClientService.SafeBatchId
  
      END
  GO
  </code></pre>