如何批量插入一年中所有星期一的日期
问题如题,不会写。插入一年中所有星期一的日期。
------解决方案--------------------select * from (
select distinct to_char(trunc(to_date('2008-01-01','yyyy/mm/dd')+level,'iw'),'yyyy/mm/dd') as v_date from dual
connect by level<=400
)
where v_date like '2008%'
我的日期是写死的
------解决方案--------------------select next_day(to_date('2008-01-01','yyyy-mm-dd')+(level-1)*7,2)
from dual
connect by next_day(to_date('2008-01-01','yyyy-mm-dd')+(level-1)*7,2) <= to_date('2008-12-31','yyyy-mm-dd')