From: chester c young <chestercyoung@yahoo.com>
To: Steve SAUTETNER <steve@sautetner.com>
To: pgsql-sql@postgresql.org
Subject: Re: Problem with "NOT IN (subquery) - use NOT EXISTS
Date: Sun, 13 Nov 2005 09:07:01 -0800 (PST)
Message-ID: <20051113170701.47847.qmail@web54314.mail.yahoo.com> (raw)
In-Reply-To: <PCEBIJLLLHHPALLADENFGECICDAA.steve@sautetner.com>
--- Steve SAUTETNER <steve@sautetner.com> wrote:
> SELECT * FROM famille WHERE famille_code NOT IN
> (SELECT DISTINCT famille_mere_famille_code FROM famille);"
try
select * from famille f1 where not exists
(select 1 from famille f2
where f1.famille_code = f2.famille_mere_famille_code);
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: chestercyoung@yahoo.com, steve@sautetner.com
Subject: Re: Problem with "NOT IN (subquery) - use NOT EXISTS
In-Reply-To: <20051113170701.47847.qmail@web54314.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox