Re: DUPLICATE KEYS
Posted in 1994
On 27 Oct 1994, Paul Roberts wrote: > In article <38lsio$h5k@emory.mathcs.emory.edu> sheltra@emh-1.submepp.navy.mil writes: > > Again, many thanks to those of you who came to my rescue for > > a technique for finding the duplicate keys. I'd like to take > > the problem a step further. I found that the file I'm > > talking about has over 7k records with duplicate keys. Is > > there a coding technique I could use to get rid of the dups > > other than by the one'zies? > > I think so - but tell me this: if two records have the same key, > but there are other non-key columns that have different values, > how are going to decide which one to delete? Is it arbitrary - > just throw away either record? Or would you have some criteria > to decide which record to keep and which to discard? > > Paul > If you are looking at 7K worth of rows with duplicate keys, it seems time to bite the bullet and write the little program that displays them by duplicate key group and make someone decide which ones should be deleted. With that volume, you might have more than two rows with duplicate key values and logic assuming only two might be very destructive. It should be fairly simple to construct the query and loop your way through with a display array for each duplicate key group and menu options to delete item 1, 2, 3, etc. Good luck -- Con Woodall Colorado St. U.; Veterinary Teach. Hosp.; Ft. Collins CO 80523; 303-491-1244 FAX 303-491-1205 cwoodall@vth1.vth.colostate.edu You can do anything with a computer, but you might not want to. --