Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SQL> alter session set nls_date_format = 'dd.mm.yyyy';
- Session altered.
- SQL> select last_day(trunc(add_months(sysdate, -level))) result
- 2 from dual
- 3 connect by level <= 13;
- RESULT
- ---------------
- 28.02.2018
- 31.01.2018
- 31.12.2017
- 30.11.2017
- 31.10.2017
- 30.09.2017
- 31.08.2017
- 31.07.2017
- 30.06.2017
- 31.05.2017
- 30.04.2017
- 31.03.2017
- 28.02.2017
- 13 rows selected.
- SQL>
Add Comment
Please, Sign In to add comment