dan...
thanks!!! like a charm.. now for the other 200 queries i'm dealing with!!
-Original Message-
From: Dan Buettner [mailto:[EMAIL PROTECTED]
Sent: Friday, December 08, 2006 1:40 PM
To: [EMAIL PROTECTED]
Cc: Peter Bradley; mysql@lists.mysql.com
Subject: Re: RE: query que
Just add a DISTINCT:
SELECT DISTINCT t1.universityID FROM SvnTBL t1 WHERE t1.universityID NOT IN
(SELECT t2.universityID FROM SvnTBL t2 WHERE t2.actionID = 2);
Dan
On 12/8/06, bruce <[EMAIL PROTECTED]> wrote:
hi peter.
thanks, the solution you gave me is close...!!
my actual data i
Dan, your suggestion is *exactly* what I needed!
Furthermore, because of the use of the subquery, there is no need to
join to table to itself, so the query may be simplified to:
mysql> SELECT distinct loc1.imageId
-> FROM locBridgeImageLocLevel5 as loc1
-> WHERE loc1.locLevel5Id
I see what's happening, Erick.
It's matching all the rows in loc1 and loc2 with the same image id.
It *is* excluding 13128, but image id 1 is still appearing because of
the rows where they match *besides* 13128. For example, 18302 and
actually also 2356 since you're joining a table on itself.
S