title: Select from union tsql
body: <p>Is it possible to select from the result of a union?  For example I'm trying to do something like:</p>
  
  <pre><code>SELECT A
  FROM
  (
      SELECT A, B FROM TableA
      UNION
      SELECT A, B FROM TableB
  )
  WHERE B &gt; 'some value'
  </code></pre>
  
  <p>Am I missing anything or making an assumption about how this works?  I'm using MSSQL 2005 so any solution will need to conform to what I can do there.</p>