11 Replies Latest reply on Mar 25, 2011 10:51 AM by Mohamed Houri

    SQL to delete rows from a table that are older than 13 months

      hi all

      wonder if you can help.. my sql is pretty poor regarding dates.

      I have a table I need to housekeep as its taking up rather alot of (much needed) space, and i need to automate this so it runs every week.

      when the data gets inserted into the table it populates a column with that day's date.

      Ive tried deletes using sysdate, but im not sure if this is the most effective way of doing this?

      Also, would it be better to use a Procedure to delete the rows or just a sql statement? (obviously using a Scheduled DB job)

      Thanks in advance for any advice and help :)