Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can Count(), CASE(), and Distrinct be combined?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01665760
Message ID:
01665774
Vues:
84
This message has been marked as the solution to the initial question of the thread.
>>This should work:
>>
>>select count( distinct( case when mytable.myfield!=0 then myTable.myField end ) ) as TotCount -- this count will exclude the 0 orders from the count (as this case is no NULL and NULL is excluded from the count)
>
>Yes. This does not give me an error. Thank you!

No problem.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform