title: union tables where date
body: <p>I need to query 2 tables in an Oracle database. One is a current table, the other is historical, with virtually the same headers. I want to be able to have a union on the query, but just a single date range. 
  An simple example of what I'm trying to do might be a better explanation:</p>
  
  <pre><code>select order_number, insertdate        
  from do_table      
  where insertdate between '1-apr-17' and '8-apr-17'   
  union  
  select order_number, insertdate  
  from doi_table  
  where insertdate between '1-apr-17' and '8-apr-17'
  </code></pre>
  
  <p>can it be written like this?</p>
  
  <pre><code>select order_number, insertdate  
  from do_table  
  union  
  select order_number, insertdate  
  from doi_table  
  where insertdate between '1-apr-17' and '8-apr-17'
  </code></pre>
  
  <p>The date range queried changes a lot and the query is quite big, and just for ease, I want the user running the query to be able to enter the date range once.</p>
  
  <p>Any tips?</p>
  
  <p>Thanks</p>