Skip to main content
4 events
when toggle format what by license comment
Jul 31, 2015 at 16:13 comment added Gandolf989 If you use "DELETE table_name WHERE change_date < ADD_MONTHS(TRUNC(SYSDATE, 'YYYY'), -12);" you will delete anything older that January 1, 2014 at midnight. In other words anything from 2013 and before. -12 just means subtract 12 months from January 1st of this year.
Jul 31, 2015 at 14:44 history edited Hannah Vernon CC BY-SA 3.0
added 6 characters in body
Jul 31, 2015 at 14:32 comment added user71835 Will this keep the current year as well? Ex: So on Aug 1st 2015, I want to keep all of 2015 (Jan 1 - Aug 1) and then all of 2014 and delete anything older.
Jul 31, 2015 at 14:26 history answered Gandolf989 CC BY-SA 3.0