Can you post some sample data here and your code?
Preferably post the sample data using CREATE and INSERT statements so we
can copy and paste the code into a program to test it out.
Frank.
Frank Cazabon
On 14/02/2013 04:52 PM, José Olavo Cerávolo wrote:
---
I know you can think i'm just s
---
>
>
>I know you can think i'm just silly, but ...
>assuming that there is a minus operator within calculation,
>it is possible to reach a zero result ;
>so, what is the result if you :
>select sum (ncost - lnFreight) * nshipqty from msambb where cclass = "CLASS"
>?
>
>
>G?rard.
Hi Gerard,
I c
From: "José Olavo Cerávolo"
---
I know you can think i'm just silly, but ...
assuming that there is a minus operator within calculation,
it is possible to reach a zero result ;
so, what is the result if you :
select sum (ncost - lnFreight) * nshipqty from msambb where cclass = "CLASS"
?
Gérard
- Original Message -
From: "José Olavo Cerávolo"
To:
Sent: Wednesday, February 13, 2013 3:38 PM
Subject: VFP5 question about SUM - Crazy behaviour
Hi All,
I am maintaining a software written in VFP 5.0a.
Here's some code I wrote for a new function.
sum (ncost - lnFreight) * nshipqty
AM
To: profoxt...@leafe.com
Subject: Re: VFP5 question about SUM - Crazy behaviour
Le 13/02/2013 15:38, José Olavo Cerávolo a écrit :
> insert into Msambb values ("CLASS", "", "SELECTED CLASS", 0, 0, 3, 0,
> 0, lnBox, lnBoxDisc)
Hi José,
the normal syntax for i
Replace the last two 0's with some figure and the check the table to see
what you have.
JERRY
-Original Message-
From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Dave Crozier
Sent: Wednesday, February 13, 2013 9:50 AM
To: ProFox Email List
Subject: RE: VFP5 question abou
Jose,
And check the set("Decimals") command, also check thet the fields in your
Insert are in the same order as the structure of the table. Really you should
do insert into () value ()
Dave
-Original Message-
From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of José Olavo Cerávo
Le 13/02/2013 15:38, José Olavo Cerávolo a écrit :
insert into Msambb values ("CLASS", "", "SELECTED CLASS", 0, 0, 3, 0, 0, lnBox,
lnBoxDisc)
Hi José,
the normal syntax for insert into is :
insert into Msambb (field1, field2, field3, field4, , field10 ) ;
values ("CLASS", "", "SELECTED C
Have you got a relationship between the cursor/table you are summing and the
Msambb table at all?
Dave C
-Original Message-
From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of José Olavo Cerávolo
Sent: 13 February 2013 14:39
To: profox@leafe.com
Subject: VFP5 question about SUM
I would check to be sure that you don't have an open cursor or table
>with the fieldnames lnBox, lnBoxDisc. If so, change the variable names,
>or precede them with m. to indicate variables. (m.lnbox, etc)
The L on the variable stands for local variable and the N stands for numeric.
Also, there
José Olavo Cerávolo wrote:
sum (ncost - lnFreight) * nshipqty for cclass = "CLASS" to lnBox
lnBoxDisc = lnBox * 0.03
insert into Msambb values ("CLASS", "", "SELECTED CLASS", 0, 0, 3, 0, 0,
lnBox, lnBoxDisc)
Now, after the sum, if I check on the variables, they both have a numeric
val
11 matches
Mail list logo