Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL not getting the results I want
Message
From
20/07/2006 13:06:11
 
 
To
20/07/2006 12:36:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01138126
Message ID:
01138145
Views:
11
Hi Cetin

DOH!

Yes the old order or evaluation of operators has bitten me. I should have known better and realised.
Thanks. I did that but unfortunately I'm still getting the same spurious answer.

Terry

>Terry,
>I'd start by putting parentheses around "or" "and" blocks of where clause. As I interpret it now:
>
>where ET.date BETWEEN ldStartCurr and ldEndCurr ;
>  OR 	( ET.date BETWEEN ldStartPrev and ldEndPrev ;
>  AND 	NOT EXISTS ... )
>
>Probably you meant:
>
>where ( ET.date BETWEEN ldStartCurr and ldEndCurr ;
>  OR 	ET.date BETWEEN ldStartPrev and ldEndPrev ) ;
>  AND 	NOT EXISTS ...
>
>Cetin
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Reply
Map
View

Click here to load this message in the networking platform