|
I'm not shure to understand your need; i'll try anyway.
Let's assume your file is:
VENDITE ACQUISTI MESE
1.000 500 1
1.500 300 1
4.000 400 2
4.500 450 2
******** Fine dati ********
By issuing:
select sum(vendite), sum(acquisti), mese
from YourFile
group by mese
you will get:
SUM ( VENDITE ) SUM ( ACQUISTI ) MESE
2.500 800 1
8.500 850 2
********
I suppose you can not use a COUNT function as an argumento of SUM function.
I hope this will help.
Let me know if you need some info more.
Sincerely
Domenico Finucci
Fiditalia , Milano, 02- 4301-2494
-----Messaggio originale-----
Da: Bill Erhardt [mailto:ERHARDT@BaldwinHQ.com]
Inviato: martedì 4 settembre 2001 19.49
A: 'midrange-l@midrange.com'
Oggetto: RE: Syntax of case statement using a count function
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
Thank you for your response but I know how to use the count(*) function.
What I'm trying to do is use the count function in a case statement like I'm
using the sum function below:
Select fielda, fieldb,
sum(case when "MONTH" Ð1 then sales else 0 end)
sum(case when "MONTH" Ð2 then sales else 0 end)
.
.
.
>From Filez
Group by fielda, fieldb
> -----Original Message-----
> From: bill.reger@convergys.com [SMTP:bill.reger@convergys.com]
> Sent: Tuesday, September 04, 2001 11:29 AM
> To: midrange-l@midrange.com
> Subject: Re: Syntax of case statement using a count function
>
>
> SELECT COUNT(*) FROM library/file WHERE FLDNAM Ð 500
--
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
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.