If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Other PC Databases > Isolating records with duplicate field values.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-09-07, 18:20
Oakwood Oakwood is offline
Registered User
 
Join Date: Jan 2007
Posts: 2
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
Reply With Quote
  #2 (permalink)  
Old 01-10-07, 07:39
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,612
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
Reply With Quote
  #3 (permalink)  
Old 01-10-07, 13:01
Oakwood Oakwood is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On