J.Windebank
Registered User.
- Local time
- Today, 05:58
- Joined
- Apr 2, 2003
- Messages
- 37
I am trying to help a friend out with delete query he needs, but it is beyond what I can do.
Here is the table structure:
tblSomething
- ID (PK)
- RVersion
- RHost
- RUser
- RLocation
- RDateTime
- RCompleted
Now, the program that enters this data cannot be edited, so whenever the program enters some data, it makes "duplicate" type records.
For example:
Now, what I need to do is create a delete query that will only keep the most recent log file for each RHost.
So in the previous example, we want to only keep:
Can anyone help?
Thanks
Edit: Ooops, thought he wanted one record per day for each host, but it turns out only to be one record per host full stop.
Here is the table structure:
tblSomething
- ID (PK)
- RVersion
- RHost
- RUser
- RLocation
- RDateTime
- RCompleted
Now, the program that enters this data cannot be edited, so whenever the program enters some data, it makes "duplicate" type records.
For example:
Code:
ID, RVersion, RHost, RUser, RLocation, RDateTime, RCompleted
1,AIDA32 v3.40,TECHS,pmurray,NOT IMPLEMENTED,14/5/03 15:18:00,1
2,AIDA32 v3.40,TECHS,pmurray,NOT IMPLEMENTED,14/5/03 15:21:00,1
3,AIDA32 v3.40,C115,jeff,NOT IMPLEMENTED,14/5/03 15:24:00,1
4,AIDA32 v3.40,C115,jeff,NOT IMPLEMENTED,14/5/03 15:25:00,1
Now, what I need to do is create a delete query that will only keep the most recent log file for each RHost.
So in the previous example, we want to only keep:
Code:
2,AIDA32 v3.40,TECHS,pmurray,NOT IMPLEMENTED,14/5/03 15:21:00,1
4,AIDA32 v3.40,C115,jeff,NOT IMPLEMENTED,14/5/03 15:25:00,1
Can anyone help?
Thanks
Edit: Ooops, thought he wanted one record per day for each host, but it turns out only to be one record per host full stop.
Last edited: