Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query For Duplicate Records
Message
De
27/09/2006 11:37:50
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
 
 
À
27/09/2006 11:24:35
Stan Vaninger
Mitek Industries, Inc
Missouri, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01157520
Message ID:
01157530
Vues:
21
>I have two tables in a mother-daughter relationship. I want to scan through the mother table looking for duplicate records (just need to compare one field) in the daughter table. Is there a slick way to do this?
>
>Thanks very much,
>Stan

Not tested, but something like this should work.
SELECT FKeyToMother, FieldToCheck, COUNT(*) AS Dupes ;
  FROM Daughter ;
 GROUP BY FKeyToMother, FieldToCheck ;
 HAVING Dupes > 1 ;
  INTO CURSOR Dupes
Regards,
Jim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform