Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does this find duplicates on the first name?

Status
Not open for further replies.

xandre

MIS
Joined
May 21, 2001
Messages
23
Location
US
I'm trying to figure out what this query is basing its duplicate-finding on. It looks like the first name..

Can someone please explain it to me?

Thanks..

SELECT DISTINCTROW First(TblforRptDistSchool.ContactFirst) AS [ContactFirst Field], First(TblforRptDistSchool.ContactLast) AS [ContactLast Field], Count(TblforRptDistSchool.ContactFirst) AS NumberOfDups
FROM TblforRptDistSchool
GROUP BY TblforRptDistSchool.ContactFirst, TblforRptDistSchool.ContactLast
HAVING (((Count(TblforRptDistSchool.ContactFirst))>1) AND ((Count(TblforRptDistSchool.ContactLast))>1));
 
It's based on ContactFirst and ContactLast. Both have to match in order for a dup to appear.

...HAVING (((Count(TblforRptDistSchool.ContactFirst))>1) AND ((Count(TblforRptDistSchool.ContactLast))>1));
Maq B-)
<insert witty signature here>
 
Ah.. I see now. Thank you :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top