title: Results of UNION Selects in SQL Server
body: <p>Is it possible to UNION queries from tables or views that don't have any result in common?  What I'm trying to do is combine data from different views into one result.  I have</p>
  
  <pre><code>select a,b,null,c from VIEW1, VIEW2 where VIEW1.a = VIEW2.a
  UNION
  select null,null,z,null from VIEW3
  </code></pre>
  
  <p>I would like the result to be a,b,z,c.  Is this where I would use select from?  What does that look like?</p>
  
  <pre><code>select ? from (
  select a,b,null,c from VIEW1, VIEW2 where VIEW1.a = VIEW2.a
  UNION
  select null,null,z,null from VIEW3)
  </code></pre>
  
  <p>I'm using MS SQL Server and the views do not have primary keys. Thanks so much.</p>