Skip site navigation (1) Skip section navigation (2)

Re: Question regarding 'not in' and subselects

From: Vic Ricker <vicricker(at)charter(dot)net>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Question regarding 'not in' and subselects
Date: 2004-05-26 19:42:06
Message-ID: 1085600526.3926.7.camel@tablet.ricker.us (view raw or flat)
Thread:
Lists: pgsql-bugs
On Wed, 2004-05-26 at 14:38, Bruno Wolff III wrote:
> On Wed, May 26, 2004 at 13:57:37 -0400,
>   Vic Ricker <vicricker(at)charter(dot)net> wrote:
> > Am I doing something wrong or is this a bug?
> 
> Are there any nulls in iasusers.user_name?

There was a null in iasusers.  I removed it and that fixed the problem. 
I'm not sure that I understand why.  It doesn't seem very intuitive...
:-)

Tom Innes's suggestion of:

select u.user_name from users u where u.user_name not in (select
user_name from iasusers ia where ia.user_name = u.user_name);

also worked.

Thanks guys!

-- 
Vic Ricker
http://www.ricker.us/



In response to

pgsql-bugs by date

Next:From: Sergey N. YatskevichDate: 2004-05-26 21:53:52
Subject: Bug in ECPG preprocessor
Previous:From: Bruno Wolff IIIDate: 2004-05-26 18:38:24
Subject: Re: Question regarding 'not in' and subselects

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group