I will count both. The records will be put in at different times. so it is ok if over time they say yes and no as long as I dont count more then one yes or no for each kid.<BR><BR>So what would the sql look like to only get it to return one for each SSN?
Ok hope this helps you..<BR><BR>If we group records together by certain identifying fields we can then use a Count function to extract those that are duplicated. This query utilizes a sub-query and, based on their <BR>Yes and No fields, returns a list of UserIDs for those Users that have duplicate <BR>records.<BR><BR><BR><BR>SELECT table.UserName, table.Yes, table.No <BR> FROM table INNER JOIN <BR> (SELECT Yes, No <BR> FROM table <BR> GROUP BY Yes, No <BR> HAVING Count(UserName) > 1 <BR> ) AS Duplicates <BR> ON table.Yes = Duplicates.Yes <BR> AND table.No = Duplicates.No