摘要: 取得一年中53個周的開始和結束日期
SELECT tab_1.COLUMN_VALUE,
NEXT_DAY(TO_DATE('0101', 'mmdd'),'星期一') + tab_1.COLUMN_VALUE * 7 - 7 AS first_day,
NEXT_DAY(TO_DATE('0101', 'mmdd'),'星期一') + tab_1.COLUMN_VALUE * 7 - 1 AS LAST_DAY
FROM TABLE
(SELECT SPLIT ('1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53', ',')
FROM DUAL
) tab_1
阅读全文