SubQuery or Find Duplicate Query

G

Guest

I have a query containing the following information:

Row FNameTop FNameA FNameB FNameC FNameD Neipc
1 245 null null null null 1
2 245 033 null null null 1
3 245 033 699 null null 1
4 245 033 699 null null 2
5 895 123 null null null 4
6 895 123 456 null null 3
7 895 123 456 669 null 1
8 895 123 456 669 324 3
9 895 123 456 669 324 2
10 895 123 456 669 324 1


In a new query, I need to return the records from above that don't have
another record with the exact numbers in fields FNameTop, FNameA, FNameB,
FNameC, FNameD. If there are 2 or more records with the same field values,
the query needs to return the record that has the largest Neipc. In the above
example, rows 3, 9 & 10 would not be returned.

I tried using a Find Duplicate query, which may work, but the above field
are only a sampling of my fields; my query actually has 12 fields that need
to be matched. I'm not familiar with using a subquery. Any help is much
appreciated.
 
E

Edward G

Please try this:
Click View>Totals
In the QBE grid Totals: for Row enter Where and for Neipc enter Max.
Allow the other fields to remain Group By.
Unclick "Show" for field "Row".

Does it work?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top