0

I have a table with a list of people ([FirstName], [Surname], [Age]). Some of these people are in the same family. I'd like to return a list of people who have another family member in the table (same surname). However I'd like to exclude records that have no other records with the same surname. Whats the best way to do this in MS Access

asked Oct 24, 2012 at 10:31

1 Answer 1

2
Select [FirstName], [Surname], [Age]
From People
Where DCount("Surname", "People", "Surname='" & SurName & "'") > 1

OR

Select P.*
From (Select Surname From People Group by Surname Having Count(*) > 1) AS G
JOIN People AS P ON P.Surname = G.Surname
answered Oct 24, 2012 at 10:43

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.