Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can Count(), CASE(), and Distrinct be combined?
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01665760
Message ID:
01665774
Views:
83
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
Previous
Reply
Map
View

Click here to load this message in the networking platform