日期:2014-05-16 浏览次数:20375 次
select min_date, to_char(min_date,'day') day from (select to_date(substr('2004-14',1,4)||'001'+rownum-1,'yyyyddd') min_date from all_tables where rownum <= decode(mod(to_number(substr('2004-14',1,4)),4),0,366,365) union select to_date(substr('2004-14',1,4)-1|| decode(mod(to_number(substr('2004-14',1,4))-1,4),0,359,358)+rownum,'yyyyddd') min_date from all_tables where rownum <= 7 union select to_date(substr('2004-14',1,4)+1||'001'+rownum-1,'yyyyddd') min_date from all_tables where rownum <= 7 ) where to_char(min_date,'yyyy-iw') ='2004-14'