Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Major SELECT - SQL logic flaw (mine or VFP?)
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00018023
Message ID:
00018067
Views:
36
>The following statement works under Fox 2.5/dos but fails under VFP 3.0
>
>SELE * FROM sar a WHERE EXISTS ;
> (SELE invno FROM invs b WHERE a.invno = b.invno ) ;
>OR EXISTS ;
> (SELE case_no FROM cases c WHERE c.case_no = a.caseno )
>
>The following statement returns 1 record
>SELE * FROM sar a WHERE EXISTS (SELE invno FROM invs b WHERE a.invno = b.invno )
>
>The following statement returns 0 records
>SELE * FROM sar a WHERE EXISTS (SELE case_no FROM cases c WHERE c.case_no = a.caseno )
>
>This is the expected behavior. I tried the following statement and it also returns 0 records.
>SELE * FROM sar a WHERE EXISTS (SELE invno FROM invs b WHERE a.invno = b.invno ) OR .F.
>
>If the first part of the WHERE evaluates to .T. and it is OR'ed with .F. it should be a .T. statement.
>
>???

i think vfp. there was a writeup of this (i think in fox advisor) early last year. makes you wonder, doesn't it?
Previous
Reply
Map
View

Click here to load this message in the networking platform