Got it working at last

SELECT lists_.DescShort_ FROM lists_ WHERE (((lists_.Name_) Not In (select
members_.List_  from members_ where members_.EmailAddr_ like  ('"& em &
"')))) union SELECT lists_.DescShort_ FROM members_ INNER JOIN lists_ ON
members_.List_ = lists_.Name_ WHERE (members_.EmailAddr_ = ('"& em & "'))

My only problem being it now lists the lists Im not a member of and the ones
I am a member of - how on earth do I show on screen which is which ?

Regards

John Berman

-----Original Message-----
From: Paul DuBois [mailto:[EMAIL PROTECTED] 
Sent: 29 February 2004 00:47
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Query Help

At 0:32 +0000 2/29/04, John Berman wrote:
>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 ?

Yes, though you would need to select the same number of columns in
each query.  Read here for more information:

http://www.mysql.com/doc/en/UNION.html


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