|Subject||RE: [firebird-support] How do find duplicates in a table?|
This may works.
SELECT PERSON.PERSON_ID, COUNT(PERSON.SOC_SEC_NO) FROM PERSON HAVING COUNT(PERSON.SOC_SEC_NO) > 1;
How do I form a SQL Select statement that will return which records in my PERSON table have duplicate SOC_SEC_NO.
In other words I need a list of persons where the social security number appears in the database more than once. Some SOC_SEC_NO may be null which I do not care about.
Any help appreciated,