Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Help?
Message
De
19/08/1997 13:55:15
 
 
À
19/08/1997 12:57:02
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00044834
Message ID:
00045605
Vues:
38
>>Can someone help me with the SQL to find duplicate records in a table where a duplicate is considered two out of five matching fields? I thought:
>>SELECT * ;
>>FROM table;
>>WHERE keyfield IN ;
>>(SELECT keyfield ;
>>FROM tablel ;
>>GROUP BY keyfield, field2;
>>HAVING count(*) > 1)
>>would do the trick, but it doesn't work. TIA
>>
>>Erik
>Need more info. Can field1 in one record be = field2...5 in another record?

No. Here's the situation. I have a table (~280,000 records) that is sort of a transacttion table that keeps track of a member's membership history. Simplified, here's the structure: jcnum (key, integer) membnum ( foreign key, integer), activity (text), jdate(date). A record might look like this:
200101,104534,"EXPIRE", {09/01/97}. or
200102,104534,"JOIN", {04/05/95}

I want to find members who have more than one expire record, and in another query, members with more than one expire on the same date. (We have found a glitch in the program that was occasionally adding duplicate records). Thanks for your help.

Erik
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform