How to locate duplicate email addresses in HEAT Classic's Profile table.

Version 1

    Details

    How to locate duplicate email addresses in HEAT Classic's Profile table.


    Resolution

     

    The following query when run through MSSQL Server Management Studio will return all Profile records where the EMailID field's value exists in more than one row:



    SELECT a.*

    FROM PROFILE a INNER JOIN

    (SELECT EmailID

    FROM PROFILE

    GROUP BY EMailID

    HAVING COUNT(*)>1) b ON b.EMailID=a.EMailID