Hi-

I know this is wrong because it doesn't work:

select name from table1
where id="03" and not in (select id from table1 where (id <> "10") AND (id
<> "20") AND (id <> "37")

table1
name id
a       03
a       11
a       12
a       13    I want a returned because it has a 03 and not a 10, a 20, OR 37
b       03
b       10      I don't want b because it has a 10
c       04
c       11
c       20      I don't want c because it doesn't have a 03
d       03      I want d returned because it has a 03 and not a 10, a 20, OR 37


I know this is childs play for some of you out there.  Any help/ideas would
be greatly appreciated.

Jerry




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to