title: mysql union to not working
body: <p>Hi im trying to merge two tables. </p>
  
  <p>I have ids that exists only in the left table and i have ids that only exists in the right table. I want to get get one table with all ids. I tried:</p>
  
  <pre><code>select * from temp_hours as a
      left outer join temp_orders as o on a.proj_id = o.proj_id
  union
  select * from temp_hours as a
      right outer join temp_orders as o on a.proj_id = o.proj_id
  </code></pre>
  
  <p>But i get the error:</p>
  
  <pre><code>Can't reopen table: 'a'
  </code></pre>
  
  <p>any ideas how i can do this? Server version: 5.0.51a-24+lenny4 (Debian)</p>