× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



At 10:09 09/04/2001, Bill Erhardt wrote:
>Does anyone out there know how to structure a SQL case statement to do a
>count(*) function?  For example, I've built SQL select statements that will
>cross foot a file and sum the quantity, and sales from individual records
>into monthly buckets but how can I count the number of occurrences using the
>case structure?

How about something like this?

Sum(Case when month = 1 then 1 else 0 end),
Sum(Case when month = 2 then 1 else 0 end),
etc...

hth
Pete
Pete Hall
pbhall@execpc.com
http://www.execpc.com/~pbhall/



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.