General information
Title:
Major SELECT - SQL logic flaw (mine or VFP?)
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.
???
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only