Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    Posts
    78

    Unanswered: Find duplicate records

    Correction
    My Customer table has a field Customer_No and a field Customer_Phone.
    I need a query that returns all records that the Customer_Phone is
    listed for to 2 Customer_No

    Thank you
    Joe
    Last edited by Joe1; 01-21-07 at 02:06.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    At 1st blush, try using the Find Duplicates Wizard found in the Query Group ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Nov 2004
    Posts
    78
    The default Find Duplicates Wizard returns all phone numbers that is listed more than once.
    I need a query that returns all phone numbers that is listed for more than one CustomerNo

    A customer can have multiple accounts; they all can have the same phone number. The primary key is the CustomerNo.

    Thanks

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Code:
    SELECT dedupe.phone, dedupe.client
       FROM dedupe
       WHERE EXISTS (SELECT *
          FROM dedupe AS z
          WHERE  z.phone = dedupe.phone
             AND z.client <> dedupe.client);
    -PatP

Posting Permissions

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