Deleting all records but most recent date
Posted on 2007-03-27
I have a question on MS SQL 2000. I am trying to put together a query to delete certain records. The schema is as follows:
Some names occur only once, but there are multiple occurances of the same names with different values for each field thereafter.
What I want to do is delete all records except for the record with the most recent date (keeping name as the key). I want to end up with only one entry for each name. When I type this out it seems simple, but I can't seem to formulate the right query.
Thanks for the help!