Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How many unique records do I have?
Message
De
04/09/2000 12:35:32
Mike Yearwood
Toronto, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00408894
Message ID:
00412263
Vues:
16
Hey Chris

>>Just thought I would jump in here with the one millionth suggestion :):

SELECT COUNT(DISTINCT StudentID)

lnDistinctCount = _TALLY
<<

This won't return the number of distinct student ids. Count(Distinct blah) will give the right value, but _TALLY will return 1 since only 1 record was selected. I usually do this...

select count(distinct studentid) as HowMany into StudentCount
?HowMany && or you can ?StudentCount.HowMany

There's only one record and your record pointer is sitting on it after the select finished.

HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform