Message
 
 
To
03/12/2006 02:09:46
General information
Fórum:
Visual FoxPro
Category:
Programação, sintaxe e comandos
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
ID da thread:
01174441
ID da mensagem:
01174461
Views:
12
>>Hi everybody,
>>
>>I have a loop, where some updates are done on Comision table in non-buffered mode.
>>
>>I recently changed my code to select sum(...) and I found a difference in my results. So, I switched back to sum ... Why would the results of these two commands differ?
>>
>>
>>SELECT SUM(rate*SHARE/10000) AS crate WHERE inv_no+salesman = m.ccinv + m.Slsman ;
>>	                FROM comision INTO ARRAY laArr
>>
>>SUM (rate*SHARE/10000) TO cRate WHILE inv_no+salesman = m.ccinv + m.Slsman
>>
>>
>>(I'm standing on the right record).
>>
>>Thanks in advance.
>
>check
>SET EXACT and SET ANSI setting

I was thinking of that, but AFAIK these settings are irrelevant since m.ccinv+m.Slsman take the full length of Inv_No + Salesman. Though I need to re-check, if I add spaces to Salesman, since it's taken from the form's unbound textbox.

I was thinking, that perhaps select sum() decides on the length of the resulting field based on the particular record...
If it's not broken, fix it until it is.


My Blog
Previous
Responder
Mapa
View