Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Old Records

Status
Not open for further replies.
Jun 1, 2011
2
GB
Hi Gurus,

I am very new to ms access and have got to do following.

I have a a table in which I have (UNIQUE_ID, ProductList , Price, Dealer_Name, Dealer_Email, Date_Time). I want to write a query which delete rows for each dealers_email where date time is old (Basicaly I want to keep only rows for each dealers_email with latest date_time).

Please help.

Vishal
 
It's dangerous to experiment with a Delete query so start by developing a standard Select query. Also make a backup of the data before going any further.

If you want to select all dealers before 2010 then put <=#01/01/2010# in the criteria row of the DATE_Time column in the query. Run that query and check that it has indeed selected the records that you want to delete. All that you have to do then is change the Select query into a Delete query and run it again. The precise details of how to do this depend on the version of Access.



Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top