Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Possible Bug in SQL Select WHERE clause in VFP7
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00563935
Message ID:
00564235
Views:
20
>Thanks for bringing this to our attention.
>
>I think this is indeed returning incorrect data. I passed it on up the line.
>
>I would recommend using the syntax below as it returns correct data and, IMO, the readability is better, i.e., it is easier to tell from the SELECT statement what the results will be.
>
>SELECT tbl1.*;
>FROM tbl1;
>WHERE tbl1.userid NOT in ;
>(select tbl2.userid FROM tbl2)
>
>I'm not sure what expected behavior with your SELECT is here, but the
>presence of the index should not make any difference in the resultset. I
>suspect the HAVING behavior is correct, and this also happens when not using
>an index on tbl2.userid.

Jim, for what it's worth, I checked this in SQL Server, and it disliked the HAVING syntax, to my surprise. I agree with you that the above syntax is clearer, though.
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform