|
有那么复杂吗?怎么那么多
select count(*)
from (select d.from_d - 1 + rownum dates
from (select to_date(&1, 'yyyymmdd') from_d,
to_date(&2, 'yyyymmdd') to_d
from dual) d
connect by rownum <= to_d - d.from_d + 1)
where to_char(dates,'d') not in ('1', '7')
and to_char(dates,'mmdd') not in('0501','0502','0503','1001','1002','1003') |
|