Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Gestionnaire de rapports & Rapports
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement