RE: Compare/Hide Dupliactes based on one field
- From: BobT <BobT@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 1 Oct 2008 10:09:00 -0700
Since you don't care which director shows up, use the MAX function on that
field and just use a basic join. Assuming you are joining on the CLUDID
field and each director has its own ContactID:
SELECT Max(Table2.ContactID) AS MaxOfContactID, FullName, ClubID, Address,
CSZ, Country, ContactZip
FROM Table2 INNER JOIN Table1 ON Table2.CludID = Table1.CludCode
GROUP BY Table2.ClubID;
"Doctor" wrote:
I have a query that finds all directors of all clubs in the USA and includes.
all of their mailing information. Some clubs have more than one director. I
would like my query to find all directors, but if it finds two directors from
the same club, I would like to only select one of them (I don't care which
one).
I have these fields in the query which contains duplicates (Please
understand that the records will be different except for the one field ClubID)
ContactID, FullName, ClubID, Address, CSZ, Country, ContactZip
Everything I have looked at before, will either find duplicates where the
entire record is the same, or only show records that are not duplicated. I
tried to do an unmatched query, but you must choose two tables, and it
doesn't let you choose the same table for comparison.
Any help would be tremendously appreciated!
- Follow-Ups:
- RE: Compare/Hide Dupliactes based on one field
- From: Doctor
- RE: Compare/Hide Dupliactes based on one field
- References:
- Compare/Hide Dupliactes based on one field
- From: Doctor
- Compare/Hide Dupliactes based on one field
- Prev by Date: Query returns 9 records with criteria that exists in one record
- Next by Date: Minimum
- Previous by thread: Compare/Hide Dupliactes based on one field
- Next by thread: RE: Compare/Hide Dupliactes based on one field
- Index(es):
Relevant Pages
|