select
dt date,
to_char(TO_DATE(dt), 'DY') day
from (select
trunc(TO_DATE(:DATE_FROM)) + level - 1 dt
from dual
connect by trunc(TO_DATE(:DATE_FROM)) + level - 1 <= trunc(TO_DATE(:DATE_TO))
)
where
to_char(TO_DATE(dt), 'DY') in ('SAT','SUN')
No comments:
Post a Comment