Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to check a table for duplicates???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00619081
Message ID:
00619159
Vues:
24
>>If I had a primary field my life would be so much easier! To find duplicate records, I need to compare the dob,last_name, and first_name. Then I can combine the cost. Also, I'm going to need to check the license they are buying. Example, if first they bought a fishing license and second record they bought a hunting license, I need to make the license = to hunting and fishing along with sum(cost).
>>
>>Any ideas?
>>
>Sunshine,
>
>Do you realize that you are losing data with what you are doing? The dates and the separate transactions will be lost forever when you combine these records into one. You might be best served to leave them as multiple records and use SELECT to bring the records you want together when you need them together.

Sunshine,

Jim's point is a good one. What I believe that you want is to create a people table based on your duplicate query. Once built, you can assign (or have auto-assigned) primary keys for the people. Then, after adding a foreign key column to the existing table, you can link the transactions with the people.

HTH.
Doug
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform