title: UNION ALL and NOT IN together
body: <p>SQL Server - I have 3 simple tables (Fname, Lname and Exceptions) with one column each called Name. I want my end result to look like: (Everybody in Fname + Everybody in LName) - (Everybody in Exceptions). </p>
  
  <p>FName:</p>
  
  <pre><code>Name
  A
  B
  </code></pre>
  
  <p>LName:</p>
  
  <pre><code>Name
  Y
  Z
  </code></pre>
  
  <p>Exceptions:</p>
  
  <pre><code>Name
  A
  Z
  </code></pre>
  
  <p>Expected Query Result Set:</p>
  
  <pre><code>B
  Y
  </code></pre>
  
  <p>Current SQL Query:</p>
  
  <pre><code>Select Name from Fname
  UNION ALL
  Select Name from Lname
  WHERE Name NOT IN
  (Select Name from Exceptions)
  </code></pre>
  
  <p>The SQL query only works on removing data which appears in LName but not in Fname. Can somebody please help.</p>