Hi,

I'm trying to build a query to solve a fairly simple problem.
I have two tables (A and B) linked by a common ID. I want to
locate a specific record in A that is linked to two or more
records in B based on second field in B matching certain criteria.
I've tried every type of inner, outer, left, and right join
to accomplish this, but can't come up with anything that works.

EG:  Select * from A inner join B on A.ID=B.ID where B.Val='25'
     and B.Val='35';

This will rturn zero matching records since B.Val can't
equal 25 and 35 at the same time.

If I substitute "and" with "or", I will get multiple records
from A that are linked to either 25 or 25. I just want the
one record that is linked to both 25 AND 35.

Thanks for any help.

Barry Wiegan
Senior Software Engineer
The Scout Project
http://www.scout.cs.wisc.edu/

---------------------------------------------------------------------
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