This may works.

SELECT PERSON.PERSON_ID, COUNT(PERSON.SOC_SEC_NO) FROM PERSON HAVING 
COUNT(PERSON.SOC_SEC_NO) > 1;





From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Sent: quinta-feira, 4 de fevereiro de 2016 17:10
To: firebird-support@yahoogroups.com
Subject: [firebird-support] How do find duplicates in a table?








Greetings All,





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.





PERSON:


PERSON_ID


SOC_SEC_NO





Any help appreciated,


Mike






  • [firebird-sup... 'stwizard' stwiz...@att.net [firebird-support]
    • Re: [fir... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
      • RE: ... 'stwizard' stwiz...@att.net [firebird-support]
        • ... 'Woody' woody-...@gt.rr.com [firebird-support]
          • ... 'stwizard' stwiz...@att.net [firebird-support]
            • ... 'Edward Mendez' emendez...@nc.rr.com [firebird-support]
        • ... Alexey Kovyazin a...@ib-aid.com [firebird-support]
    • RE: [fir... Peterson Seridonio loukinh...@hotmail.com [firebird-support]
    • Re: [fir... Svein Erling Tysvær setys...@gmail.com [firebird-support]

Reply via email to