Select Duplicates

Results 1 to 2 of 2

Thread: Select Duplicates

  1. #1
    Join Date
    Dec 1969

    Default Select Duplicates

    Here&#039;s the deal: <BR><BR>I&#039;ve got a Fox Pro Database with about 50K records. It has a field with the F.P. Equiv of a VarChar field. I need to find duplicates on that field. I as thinking something like this, but it&#039;s just too **** slow:<BR><BR>SELECT A.User13, A.UniqueID From tCustomerContact A Where A.User13 IN(Select B.User13 From tCustomerContact B WHERE A.User13 = B.UserI3 AND NOT A.UniqueID = B.UniqueID)<BR><BR>Is there a better way to do this?

  2. #2
    Join Date
    Dec 1969

    Default Might try HAVING

    &nbsp;<BR> Can&#039;t remember for sure whether this is support in FoxPro<BR><BR> select ColA,count(*)<BR> from tableA<BR> group by ColA<BR> Having Count(*) &#062;1 <BR> order by ColA ASC<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts