Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate records
Message
 
À
25/07/2000 11:24:29
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00396583
Message ID:
00396613
Vues:
9
Much better. I didn't want to throw in the "having" because I was away from VFP.

>
>SELECT COUNT(Sin) as DupCnt, Sin + DTOS(Add_date) + Add_time AS pKey ;
>  FROM SheenaTable ;
>  GROUP BY pKey;
>  INTO CURSOR cDuplicates ;
>  HAVING DupCnt > 1
>
>
>
>
>>>Hi:
>>>
>>>I want to list duplicate records that are violating my primary key of sin+dtos(add_date) + add_time form my employ table.
>>
>>Off the top of my head
>>
>>SELECT cnt(sin) as dupcnt, sin+dtos(add_date) + add_time as pkey ;
>>  FROM sheenatable ;
>>  ORDER BY 1 DESC ;
>>  GROUP by 2 ;
>>  INTO CURSOR cDuplicates
>>
>>
>>Then look for any items with dupcnt > 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform