title: Incorrect syntax near the keyword 'from' (NOT IN)
body: <p>I’m trying to match different transactions but I’m not able to find why this is not working. The problem is with the last <code>FROM (c.ClientId from #amount1)</code>. I’ve tried to use temporary tables and CTE and even trying the full subquery directly. I’ve tried the <code>NOT EXISTS</code> as well but I’m interested in <code>NOT IN</code> so I want the <code>NULL</code> values.</p>
  
  <pre><code>SELECT * 
  into #transactions
  FROM #amount1
  UNION ALL
  SELECT * 
  FROM #amount2
  UNION ALL
  select  c.ClientId,
      c.ClientName,
      c.Date
      t.currency
  from #clients c
  LEFT JOIN transaction t ON c.ClientId = t.ClientID
  WHERE c.ClientId NOT IN ( c.ClientId from #amount1)
  AND c.ClientId NOT IN ( c.ClientId from #amount2)
  </code></pre>
  
  <p>Many thanks.</p>
  
  <p><strong>UPDATE</strong>: My error was that I was missing the SELECT:</p>
  
  <pre><code> WHERE c.ClientId NOT IN ( SELECT ClientId from #amount1)
   AND c.ClientId NOT IN ( SELECT ClientId from #amount2)
  </code></pre>
  
  <p>I'm so sorry for this. I'm quite new and I have often errors like this but this time I didn't realise. </p>
  
  <p>Thanks for your help.</p>