Keith C. Ivey wrote:
>On 11 Nov 2002, at 20:03, James Dyer wrote:
>>SELECT * FROM foo WHERE id2=1 AND id2=2 (for example),
>>I just get an empty set returned. An explain on the query gives an 'Impossible
>Because it's impossible for id2 to be both 1 and 2. What were you
>expecting? Did you mean "id1 = 1 AND id2 = 2"? If not, you need to
>explain what records you're trying to get.
I've found that quite a few people I know misconstrue boolean values to
mean the opposites of what they in fact do mean in queries as in "I want
the record where ID is 1 and the record where it is 2" is not as written
above, but in fact "WHERE ID2 IN (1, 2)" or "WHERE ID2 = 1 OR ID2 = 2".
A logic course would fix most of these problems of course ...
Michael T. Babcock
C.T.O., FibreSpeed Ltd.