임시)날짜게산
with
AA as (
select
'20110301' dt,
'삼일절' cmt
from
dual
)
select
count(*) cnt
from
(
select
to_char(sdt + LEVEL - 1, 'yyyymmdd') dt,
to_char(sdt + LEVEL - 1, 'd') d
from
(
select
to_date('20180228', 'yyyymmdd') + 1 sdt,
to_date('20180302', 'yyyymmdd') edt
from
dual
)
connect by
LEVEL <= edt - sdt + 1
) a,
AA
where
a.dt = AA.dt(+)
and a.d not in (
'1',
'7'
)
and AA.dt is null
댓글
댓글 쓰기