I need to find duplicates in the records of a table, but also need to see all the fields,, not just the fields that might contain duplicate information.
Here's the code I'm trying;
<CFQUERY NAME="DC" dbtype="query">
SELECT LastName, FirstName, Zip, CamperID, Zip, Email
FROM DC
WHERE LastName In (SELECT LastName FROM GetCmprs As Tmp GROUP BY LastName,FirstName,Birthday HAVING Count(*)>1 And FirstName = GetCmprs.FirstName And Zip = GetCmprs.Zip
ORDER BY LastName, FirstName, Zip
</cfquery>
Here's the code I'm trying;
<CFQUERY NAME="DC" dbtype="query">
SELECT LastName, FirstName, Zip, CamperID, Zip, Email
FROM DC
WHERE LastName In (SELECT LastName FROM GetCmprs As Tmp GROUP BY LastName,FirstName,Birthday HAVING Count(*)>1 And FirstName = GetCmprs.FirstName And Zip = GetCmprs.Zip
ORDER BY LastName, FirstName, Zip
</cfquery>