Paul

Err no, new area for me this 


My two queries independently look like this


This give me all the lists some one is not a member of

SELECT lists_.Name FROM lists_ WHERE (((lists_.Name_) Not In (select
members_.List_  from members_ where members_.EmailAddr_ like  ('"& em &
"')))) 

And for all the list someone is in

SELECT ists_.Name_, members_.EmailAddr_
FROM lists_ INNER JOIN members_ ON lists_.Name_ = members_.List_
WHERE (((members_.EmailAddr_) like ('"& em & "')))

So a union joins them somehow ?

Oh em is the variable I feed in

John B

-----Original Message-----
From: Paul DuBois [mailto:[EMAIL PROTECTED] 
Sent: 29 February 2004 00:08
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Query Help

At 23:09 +0000 2/28/04, John Berman wrote:
>Hi
>
>Using MySql 4.x and need some help with a query
>
>There are two tables
>
>Lists
>Which holds list name +other stuff
>
>Members
>Which holds list name from above, email address + other stuff
>
>
>I want to list all the lists and then which lists a member is associated
>with.
>
>Eg
>
>List1 - Member
>List2 - Not a Member
>List3 - Member
>
>I can do a query that show the lists some is a member or a separate query
to
>show which they are not a member of but not a query to bring the whole
thing
>together

Have you tried using a UNION of the two queries?


-- 
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to