Select TO_DATE('20110101','YYYYMMDD')+(LEVEL - 1) YMD, ROWNUM WEEKDAY, LEVEL DAYS
From dual
Where TO_CHAR(TO_DATE('20110101','YYYYMMDD')+(LEVEL - 1), 'D') = '2'
Connect By TO_DATE('20110101','YYYYMMDD')+(LEVEL - 1) <= TO_DATE('20111231','YYYYMMDD')
Order By LEVEL

 

Posted by sangheum
TAG ,