Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

how to delete all sys.tables data based on datetime.

suppose i have 10 tables in one database and don't have datetime column, then how to delete on that 10 tables between startdate and enddate(i have 30 days infromation on that tables. i am deleting 20 days information between the dates)

how it is possible.
Posted

1 solution

If you don't have a datetime column then there is no way of filtering the data to delete.
 
Share this answer
 
Comments
K N R 20-Oct-11 9:38am    
hi mehdi,
forgot datetime, is there any way to delete data
Mehdi Gholam 20-Oct-11 9:50am    
Like I said there is no way to filter the data, you can delete heuristically by picking a row to delete from!
K N R 20-Oct-11 9:59am    
OK thanks for ur suggestion
fjdiewornncalwe 20-Oct-11 13:28pm    
Good answer. I always shake my head at the "How do I filter on something I haven't saved?" questions. It equates to "We don't have any fries, but would you like fries with that?"
Mehdi Gholam 20-Oct-11 13:57pm    
Thanks

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