title: trigger for update another table with condition
body: <p>I am new to triggers 
  i have two tables with names  ArefSms And tblSalesProd</p>
  
  <p>i want after an insert my trigger update ArefSms where tblSalesProd.SalesID=ArefSms.SalesID
  for this propose i write below code </p>
  
  <pre><code>USE [ACEDB]
  GO
  
  SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER ON
  GO
  
  ALTER TRIGGER [dbo].[areftblSalesProd] ON [dbo].[tblSalesProd]
  AFTER INSERT
  AS
  Begin Try
  Update ArefSms 
         set
          qt=inserted.ProdQty
          where ArefSms.SalesID=inserted.SalesID
  
  
  
  End Try
  Begin Catch
  
  End catch
  </code></pre>
  
  <p>but now i have error </p>
  
  <pre><code>Msg 4104, Level 16, State 1, Procedure areftblSalesProd, Line 9
  The multi-part identifier "inserted.SalesID" could not be bound.
  </code></pre>
  
  <p>What can I do?</p>