title: SQL condition on unioned tables
body: <p>I'm trying to execute a query with union and then put an additional condition on the result. Basically, I want to have something like</p>
  
  <blockquote>
    <p>SELECT * FROM (A UNION B) WHERE condition</p>
  </blockquote>
  
  <p>Is this possible to do? When I try to execute</p>
  
  <blockquote>
    <p>SELECT * FROM (A UNION B) </p>
  </blockquote>
  
  <p>SQL Management Studio complains about the closing bracket:</p>
  
  <blockquote>
    <p>Incorrect syntax near ')'.</p>
  </blockquote>