SELECT ROWNUM, to_date('2008-08-01','yyyy-mm-dd') + rownum -1 FROM dual CONNECT BY ROWNUM < (to_date('2008-08-20','yyyy-mm-dd') - to_date('2008-08-01','yyyy-mm-dd') +1 ) ;