title: Oracle recursive query to get date range
body: <p>I need to use following query to get a date range</p>
  
  <pre><code>with DATETABLE (tempdate) AS
  ( 
  SELECT trunc(to_date('2020-01-01 01:00:00','yyyy-mm-dd hh24:mi:ss')) AS tempdate from dual
  UNION ALL 
  SELECT tempdate + 1 FROM DATETABLE 
  where tempdate &lt; to_date('2020-02-01 01:00:00','yyyy-mm-dd hh24:mi:ss')
   )
  
  select tempdate from DATETABLE
  </code></pre>
  
  <p>I got errors</p>
  
  <pre><code>ORA-01790: expression must have same datatype as corresponding expression
  01790. 00000 -  "expression must have same datatype as corresponding expression"
  *Cause:    
  *Action:
  Error at Line: 5 Column: 20
  </code></pre>
  
  <p>How to fix it?</p>