Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding Dups based on Three Fields
Message
De
05/06/2006 18:21:26
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
05/06/2006 17:39:27
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01127219
Message ID:
01127225
Vues:
12
>I have a table which has three fields in which the data can be duplicated(keeps detail records with unique record numbers) ....I have records with the first two fields matching and the third not. What kind of select statement can I write to find these records and correct them?

Hi Steven,

Use code like this:
Select ;
  Field1, Field2, Count(Distinct Field3) ;
  From Table ;
  Group By Field1, Field2 ;
  Having Count(Distinct Field3) > 1
After that I'd set a relation from the result into the table, step through it, and correct/delete whatever you want.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform