select to_char(d,'yyyymmdd') from (select (trunc( to_date('2014-01-01','yyyy-mm-dd') + (rownum - 1)) ) d from dual connect by rownum<=365)
where to_char(d,'day')='星期日' or to_char(d,'day')='星期六'
select to_char(d,'yyyymmdd') from (select (trunc( to_date('2014-01-01','yyyy-mm-dd') + (rownum - 1)) ) d from dual connect by rownum<=365)
where to_char(d,'day')='星期日' or to_char(d,'day')='星期六'