title: Query which gives list of dates between two date ranges
body: <p>I am sorry for this but my previous question was not properly framed, so creating another post.</p>
  
  <p>My question is similar to following question:
  <a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:14582643282111" rel="nofollow">http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:14582643282111</a></p>
  
  <p>I need to write inner query which will give me a list of dates between two date ranges to outer query.</p>
  
  <p>My inner query returns following 2 rows:</p>
  
  <pre><code>SELECT request.REQ_DATE, request.DUE_DATE FROM myTable where id = 100
  
  REQ_DATE           DUE_DATE
      3/19/2013          3/21/2013 
      3/8/2013           3/8/2013
  </code></pre>
  
  <p>So I need inner query which will return following dates to outer query:</p>
  
  <pre><code>3/19/2013
  3/20/2013
  3/21/2013
  3/8/2013
  </code></pre>
  
  <p>The answer in above post has start date and end date hard coded and in my case, it is coming from other table. So I am trying to write query like this which does not work:
   </p>
  
  <pre><code>Select * from outerTable where  my_date in
  (   
      select to_date(r.REQ_DATE) + rownum -1 from all_objects, 
      (   
           SELECT REQ_DATE, DUE_DATE
           FROM    myTable where id = 100
      )  r                              
      where rownum &lt;= to_date(r.DUE_DATE,'dd-mon-yyyy')-to_date(r.REQ_DATE,'dd-mon-yyyy')+1;
  )
  </code></pre>