SELECT to_date('2007-02-01', 'yyyy-mm-dd') + rownum / 24 AS hour FROM dualCONNECT BY rownum < (to_date('2007-02-02', 'yyyy-mm-dd') - to_date('2007-02-01', 'yyyy-mm-dd')) * 24;