title: Recursive SQL giving ORA-01790
body: <p>Using Oracle 11g release 2, the following query gives an ORA-01790: expression must have same datatype as corresponding expression:</p>
  
  <pre><code>with intervals(time_interval) AS
   (select trunc(systimestamp)
      from dual
    union all
    select (time_interval + numtodsinterval(10, 'Minute'))
      from intervals
     where time_interval &lt; systimestamp)
  select time_interval from intervals;
  </code></pre>
  
  <p>The error suggests that the datatype of both subqueries of the UNION ALL are returning different datatypes.</p>
  
  <p>Even if I cast to TIMESTAMP in each of the subqueries, then I get the same error.</p>
  
  <p>What am I missing?</p>
  
  <p><strong>EDIT:</strong> I'm not looking for a CONNECT BY replacement.</p>