On 2/3/2011 12:47 PM, Puneet Kishor wrote:
> Ahhhh... I see now. It is trickier than I thought. How about
>
> SELECT *
> FROM Customers
> WHERE Type = 'Apple' AND EntryID NOT IN (SELECT * FROM Customers WHERE
> Type != 'Apple');

I assume you meant "NOT IN (SELECT EntryID..." . Naturally, an EntryID 
for an entry having Type='Apple' won't appear in the list of entries 
having Type != 'Apple'. The second condition is always true whenever the 
first is.
-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to