日期:2014-05-17 浏览次数:20818 次
with t1 as ( select 'C1121' A,date'2012-09-11' RQ,3 cs from dual union all select 'C1122' A,date'2012-09-19' RQ,1 cs from dual union all select 'C1124' A,date'2012-09-19' RQ,2 cs from dual ) select distinct A,rq+level rq,cs from t1 connect by level <= cs+1 order by A,RQ A RQ CS ------------------------------------- 1 C1121 2012/9/11 3 2 C1121 2012/9/12 3 3 C1121 2012/9/13 3 4 C1121 2012/9/14 3 5 C1122 2012/9/19 1 6 C1122 2012/9/20 1 7 C1124 2012/9/19 2 8 C1124 2012/9/20 2 9 C1124 2012/9/21 2