Gary,
So what you *really* want is an -OR- condition...
a member of elks
-OR-
a member of moose
-OR-
a member of eagles
Something like this, perhaps...
SELECT tableA.id,tableA.name,tableA.addr,tableA.city,tableA.state,tableA.zip
FROM tableA,tableB
WHERE tableA.id=tableB.tableAid
AND (tableB.group='eagles' OR tableB.group='moose' OR
tableB.group='elks');
(No guarantees as I've not tried this...)
~Gary
----- Original Message -----
> How would I create an SQL statement for the 'AND' condition? Let me
explain...
> I have two tables, tableA (id,name,addr,city,state,zip) and tableB
> (tableAid,group). Table A is just a list of names, and table B is a list
of
> groups that each person in table A belongs to. How do I create a SQL
statement
> that will show everyone in table A that has three particular records in
table
> B? (In english "Show me everyone that is a member of the elks,moose,and
eagles
> clubs") It's easy to show everyone that is a member of any one of the
> requested groups, but how do I show people that have all three records in
> table B?
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.