|
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 mailing list archive is Copyright 1997-2025 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.