Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007
    Posts
    2

    Unanswered: Isolating records with duplicate field values.

    I have a dBase file and it has a field called Serial. The Serial field should be unique for each record. Something happened in the database or the program, and now there are records with Serial duplicated. For instance Record 1 has an IDKEY of A and a Serial field of 0009, record 500 has an IDKEY of E and a Serial of 0009. I need to isolate all records that have duplicate Serial fields regardless of their IDKEY values.

    I need to either delete all records(in a copy of the original) that don't have a duplicate Serial field or copy to a new file all records that have duplicate Seral field regardless of the value of IDKEY. I tried a couple programs out there that delete duplicate records based on Fields, but what it ends up doing is deleting one of the duplcate records - I need to keep both of them and be able to look at all the duplcated fields while getting rid of all the 'good' records for now.

    Is there a syntax that will do this?

    Thanks for your help

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    This is something that is relatively hard to do with the dBase native programming language, but it is easy to do using SQL. A lot depends on what tools you've got available to solve this problem. Do you have a SQL Engine (like MSDE, SQL Server, DB2, Oracle, etc) ?

    -PatP

  3. #3
    Join Date
    Jan 2007
    Posts
    2
    I was able to accomplish with this by opening a copy of the file in Access. It actually has a built in Wizard just for this purpose that works very well. Thanks for your help.

Posting Permissions

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