I am trying to remove data from a table in a database. Like a sort of archiving processes whereby I remove one week of data at a time.
So I select the min date from the table (select min (TIMESTAMP) from <tblname>)
Which returns a date in the following format -> 20070114 13:22:59.843671 +0000?
I want to be able to add seven days to that field so I will end up with 20070121
And then I can delete from table name where TIMESTAMP < '20070121'
Any suggestions?
Thanks
Anjel
So I select the min date from the table (select min (TIMESTAMP) from <tblname>)
Which returns a date in the following format -> 20070114 13:22:59.843671 +0000?
I want to be able to add seven days to that field so I will end up with 20070121
And then I can delete from table name where TIMESTAMP < '20070121'
Any suggestions?
Thanks
Anjel