SELECT A.email, A.email_2, A.firstname, A.lastname, A.people_ref, A.people_ref_no, A.name, A.title
FROM [TBL-Master] A,
(
SELECT TMP
FROM (SELECT TMP FROM (SELECT [email] AS TMP FROM [TBL-Master] where [email] is not null UNION ALL SELECT [email_2] AS TMP FROM [TBL-Master] where [email_2] is not null) AS TT GROUP BY TMP HAVING COUNT(*) > 1)
) AS B
WHERE
A.email = B.TMP
OR
A.email_2 = B.TMP
ORDER BY A.email, A.email_2
|