Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Count - Why is this counting everything?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00102086
Message ID:
00102132
Vues:
26
>>Paul,
>>
>>You're very close. Count simply gives you the number of records it encounters. What you put inside the parenthises may affect the performance but it certainly won't affect the result.
>>
>>Try SUM(IIF(ISNULL(Table1.Rnum) > 0,1,0)) AS RnumTotal.
>>
>
> That almost worked. SUM(IIF(ISNULL(Table1.Rnum),1,0)) AS RnumTotal worked better. Thanks for the help.

Oops, I guess I copied your code and didn't quite modify it enough. Looks like a data-type mismatch waiting to happen!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform