Knowledge Base

How To Create a List of Duplicate Records

Article ID: 118294

Article Last Modified on 12/1/2003


APPLIES TO


This article was previously published under Q118294

SUMMARY

This article shows how to generate a list of duplicate records in a database so that you can visually determine what records need to be deleted.

MORE INFORMATION

The following code generates a full list of the duplicate records in INVOICES.DBF and places the list in a cursor named XXX:
   USE <FoxPro_directory>\tutorial\invoices
   SELECT * FROM invoices WHERE cno IN ;
      (SELECT cno FROM invoices GROUP BY cno HAVING COUNT(cno) > 1) ;
      ORDER BY cno ;
      INTO CURSOR xxx
				

Additional query words: VFoxWin FoxMac FoxDos FoxWin identical exact same having clause

Keywords: KB118294