friedgoldmole
New member
- Local time
- Yesterday, 21:02
- Joined
- Sep 8, 2016
- Messages
- 2
Assuming I have the following data in a table
Month TechID PlanUnit GrossHours
01/01/2017 10165 CARLI 37.5
01/01/2017 10170 THAMS 112.5
01/01/2017 10487 WATFD 167.5
01/01/2017 10541 IPSWI 160
01/01/2017 10541 TSIDE 80
In instances where any individual TechID has more than one entry for a given month (10541 in above example) I want to return only the one record where the GrossHours number is the biggest, in the above example that would be the one with PlanUnit: IPSWI and Gross Hours: 160.
I have been playing with Sub Queries but not come up with anything that works properly, any advice would be greatly appreciated.
Liam
Month TechID PlanUnit GrossHours
01/01/2017 10165 CARLI 37.5
01/01/2017 10170 THAMS 112.5
01/01/2017 10487 WATFD 167.5
01/01/2017 10541 IPSWI 160
01/01/2017 10541 TSIDE 80
In instances where any individual TechID has more than one entry for a given month (10541 in above example) I want to return only the one record where the GrossHours number is the biggest, in the above example that would be the one with PlanUnit: IPSWI and Gross Hours: 160.
I have been playing with Sub Queries but not come up with anything that works properly, any advice would be greatly appreciated.
Liam