임시)날짜게산

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

댓글

이 블로그의 인기 게시물

전자정부프레임워크 MSSQL 연동하기

request.getServletContext 가 빨간줄 생길때

자바스크립트로 confirm 을 이용한 페이지 이동