发布网友 发布时间:2022-03-08 09:07
共1个回答
热心网友 时间:2022-03-08 10:36
select a.startdate,
a.enddate,
a.startdate + b.dis - 1 hdate,
a.store
from testtable a,
(select rownum dis
from (select max(enddate - startdate) + 1 gap from testtable)
connect by rownum <= gap) b
where a.enddate >= a.startdate + b.dis - 1
order by a.store,
hdate
这是查询结果