11 Replies Latest reply: Mar 25, 2011 5:51 AM by Mohamed Houri RSS

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

    782530
      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 :)

      Ash