Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find Duplicates
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01493182
Message ID:
01493185
Vues:
66
>I am having a heckuva time trying to find duplicates in a client's table. It seems that they've had some corruption in their database as well, so I used VALIDATE DATABASE, which gave me a clue that their primary key wasn't in synch with referential integrity.
>
>Isn't there a simple SQL statement I can use to find the dupes? This table is huge.

Sample with Northwind Database:
OPEN DATABASE (HOME(2) + "Northwind\Northwind")
SELECT * ;
  FROM Territories T1;
  WHERE EXISTS ;
  (SELECT * ;
  FROM Territories T2 ;
  WHERE T1.TerritoryDescription = T2.TerritoryDescription ;
  GROUP BY T2.TerritoryDescription ;
  HAVING COUNT(*) > 1)
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform