Click here to Skip to main content
15,890,947 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to purge 3 months old data from database but problem is i don't have date column in that table.

Is it possible by any means. Please help me out

What I have tried:

Tried searching for this but not finding any link
Posted
Updated 22-Oct-18 21:22pm
Comments
Mehdi Gholam 23-Oct-18 3:08am    
Link it to other tables that have a date (which make sense) or guess.

1 solution

If you don't have a date column, then you can;t tell when the data was inserted - so you can't delete it.

Your only real solution is to add an InsertDate column to your table (you can give it a default value of GETDATE() if necessary) and you can then purge old rows.
But without a column to tell you which ones are outdated, you can't reliably delete anything!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900