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.
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) ?