We have found a query that does not give a result, while it should.

The query is:
select id
from productionentry
where id NOT IN (select productionentryid from zentry)
AND examid=12581;

There are rows in the table productionentry for which the id does not exist in 
the column productionentryid in the table zentry.
However, when we execute the following query (which should be practically the 
same), we do get results:
select id
from productionentry
where id NOT IN (select id
from productionentry
where id IN (select productionentryid from zentry)
AND examid=12581)
AND examid=12581;

So for some reason the NOT IN keyword does not work correctly. We created a 
test database that can be downloaded here: 
http://www.coachrdevelopment.com/share/querybug.zip .

Are we missing something, or is this a bug?

Best regards,

Harmen de Jong
CoachR Group B.V.

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to