View Full Version : Selecting from duplicate records


robr
02-14-2010, 05:37 PM
I have an query ( ACDEFECTqry) which gives me duplicate records for the field "DEFECT_NUMBER". For instance:
Record No, DEFECT_NUMBER, ACTION_NO
1 ,109539, 5
2 ,109539, 4
3 ,109539, 3

I need to create another query which shows me only the defect with the highest ACTION_NO. In this case I want only record no 1 with Defect 109539 with Action No 5 as the result of my query.

Does anybody know how to do this??

Kind regards, Rob

pbaldy
02-14-2010, 05:42 PM
Not sure if you need just the first query, or both. Depends on your ultimate goal:

http://www.baldyweb.com/LastValue.htm

robr
02-15-2010, 11:05 AM
Yes, that worked. Thanks for your help. Rob :)

pbaldy
02-15-2010, 11:54 AM
Happy to help, Rob. Welcome to the site by the way!