Any Ideas ? 
Author Message
 Any Ideas ?

When attempting to identify offsetting records in one of our databases, the
team saw conflicting results from seemingly identical queries.

From cursors created like so:
sele * from finalloancommissions where transtype=="CNCP" into curs cncp
sele * from finalloancommissions where transtype=="ADJP" into curs adjp

First we tried:
sele a.* from adjp a, cncp b where a.lo_no=b.lo_no and a.loanid=b.loanid and
a.totcomm+b.totcomm=0 and a.autoallow+b.autoallow=0

This returned 1256 records.

Next we tried:
sele a.* from adjp a, cncp b where a.lo_no=b.lo_no and a.loanid=b.loanid and
a.totcomm*(-1)= b.totcomm and a.autoallow*(-1)=b.autoallow

This returned 239 records.

The 1017 "missing" records all have autoallow=0.00, which suggests that
while 0+0=0, 0*-1 does not. Has anyone ever encountered behavior like this
from foxpro?

Note: The fields are numeric, and rounding (before or after multiplying) had
no effect.



Sun, 09 Mar 2003 03:00:00 GMT  
 Any Ideas ?
I don't have your solution, but to add to interesting things, these ?
command produced these results for me (in VFP 5 sp4... lines starting
with -> are VFP output, and ~ (tildes) represents spaces):
?0
->0
?0*0
->~~0
?0*(-1)
->~~~0
x=0
y=0*0
z=0*(-1)
?x
->~~~~~~~~~0
?y
->~~~~~~~~~0
?z
->~~~~~~~~~0
?Set('TALK')
->OFF
?Set('ECHO')
->OFF

On Wed, 20 Sep 2000 21:04:04 -0400, "Hari Kumar"

Quote:

>When attempting to identify offsetting records in one of our databases, the
>team saw conflicting results from seemingly identical queries.

>From cursors created like so:
>sele * from finalloancommissions where transtype=="CNCP" into curs cncp
>sele * from finalloancommissions where transtype=="ADJP" into curs adjp

>First we tried:
>sele a.* from adjp a, cncp b where a.lo_no=b.lo_no and a.loanid=b.loanid and
>a.totcomm+b.totcomm=0 and a.autoallow+b.autoallow=0

>This returned 1256 records.

>Next we tried:
>sele a.* from adjp a, cncp b where a.lo_no=b.lo_no and a.loanid=b.loanid and
>a.totcomm*(-1)= b.totcomm and a.autoallow*(-1)=b.autoallow

>This returned 239 records.

>The 1017 "missing" records all have autoallow=0.00, which suggests that
>while 0+0=0, 0*-1 does not. Has anyone ever encountered behavior like this
>from foxpro?

>Note: The fields are numeric, and rounding (before or after multiplying) had
>no effect.



Mon, 10 Mar 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Please Give Me Ideas on Problem

2. Ideas

3. Any Ideas - VFP anomalies?

4. Any Ideas?????

5. need good FPW book or some ideas

6. Ideas on improving performance.

7. Ideas on adding an option to _MSYSMENU

8. Request: Your Ideas for Magazine Articles, Please!

9. I need ideas for text with data!

10. Need to protect a VFP Web application Idea!

11. Design Ideas Needed Please

12. Design/Direction ideas.

 

 
Powered by phpBB® Forum Software