Subject |
Re: SUM |
From |
Mervyn Bick <invalid@invalid.invalid> |
Date |
Fri, 12 Jan 2024 17:30:55 +0200 |
Newsgroups |
dbase.getting-started |
On 2024/01/12 14:13, Jerry Frost wrote:
> Jerry Frost Wrote:
>
>> I have a table with a numerical field named ENTRYFEE containing both positive and negative numbers in the format 1.00,2.00,-3.00, etc.
>> Every time I SUM this field I get 0.00 ?
>>
>> sum entryfee to x
>> ? x
>>
>> I am still new at this so much appreciation for a possible solution.
>>
>
> The entryfee field does have several more positive and negative entries. The SUM(amount) worked perfectly until a few days ago when it now produces only a zero value? The correct result should be a positive number with the values I have in my table now.
>
Put the following in a program and run it.
use tablename
total = 0
scan
total+=entryfee
?recno(),entryfee,total
endscan
use
This should show you where things are going wrong. Once you know that
you can dig a bit deeper.
Mervyn.
|
|