var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Delete Data to According Date
I have a table which have huge amount of data.
ID MSG TYPE SMALLCONT LARGECONT AUDID CREATETIMESTAMP
So i want to delete data except IDs which are less than 15 days old.
Can you help me with a query.
Also i want to grab the IDs which im deleting ,because this is a Production TEST env and I want to avoid DB locks as well...
Can you plz suggest me a way to solve this problem.
Where are you stuck? What do you want to do with IDs after you "grab"them.
If you are deleting rows, why is the a concern if they are locked? They shouldn't be referenced to get locked?
Either this is far more starightforward than the questions ask or i am missing something.
Thanx for the reply
My question is delete data except IDs which are less than 15 days old
I figure out rest of the problems during this time...
If you can suggest me a SQL my problem will solve
select id from hugetable where createtimestamp = ( current timestamp - 15 days )
delete hugetable where createtimestamp = ( current timestamp - 15 days )
not sure will this help
Pass Date parameters
Last edited by ai_zaviour; 09-25-12 at 11:12.