title: update with left join in postgresql
body: <p>How to write a query for updating a table that has two left joins. Below is a query in MSSQL, I want to convert it into postgresql. Please help.</p>
  
  <pre><code>Update T1 Set  
              T1.Amount = (T1.Amount - T2.Disc) + ((DT1.N_Amount)/2)
  
      From @Before T1
      Left Join @Before T2 On T1.ID = T2.ID
      Left Join @DiscTable DT1 On T1.PurchID = DT1.Purch_ID
  </code></pre>