From: Tom Lane <tgl@sss.pgh.pa.us>
To: Walt Bigelow <walt@stimpy.com>
Cc: pgsql-sql@hub.org
Subject: Re: [SQL] subqueries
Date: Tue, 13 Apr 1999 11:37:43 -0400
Message-ID: <27286.924017863@sss.pgh.pa.us> (raw)
In-Reply-To: <199904130300.XAA21309@hub.org>
Walt Bigelow <walt@stimpy.com> writes:
> SELECT agencyid, first, last
> FROM tbladdress
> WHERE type = 1
> AND agencyid NOT IN
> (SELECT distinct agencylink
> FROM tbladdress
> WHERE type = 2)
> ORDER BY last;
Looks reasonable ...
> This query returns 0 rows [ when it shouldn't ].
Sounds like a bug. What version of Postgres are you running?
What do you get from "EXPLAIN"ing that query? What are the
data types of the columns being used?
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, walt@stimpy.com, pgsql-sql@hub.org
Subject: Re: [SQL] subqueries
In-Reply-To: <27286.924017863@sss.pgh.pa.us>
References: <199904130300.XAA21309@hub.org> <27286.924017863@sss.pgh.pa.us>
* 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