From: hubert depesz lubaczewski <depesz@depesz.pl>
To: PGSQL-SQL <pgsql-sql@postgresql.org>
Subject: Re: subselects
Date: Sat, 2 Dec 2000 11:27:23 +0100
Message-ID: <20001202112723.A29244@gruby> (raw)
In-Reply-To: <3A259958.D6C578D5@selectacast.net>
References: <3A259958.D6C578D5@selectacast.net>
On Wed, Nov 29, 2000 at 07:03:36PM -0500, Joseph Shraibman wrote:
> I tried to do this:
> SELECT r , a , (SELECT u , re FROM dir WHERE u = a) , cdate FROM rep
> WHERE m IN(190);
why dont you use simple join?
like:
select rep.r, rep.a, rep.cdate, dir.u, dir.re from rep, dir where rep.m in
(190) and rep.a = dir.u;
this should (i guess) work perfectly
depesz
--
hubert depesz lubaczewski
------------------------------------------------------------------------
najwspanialszą rzeczą jaką dało nam nowoczesne społeczeństwo,
jest niesamowita wręcz łatwość unikania kontaktów z nim ...
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: depesz@depesz.pl
Subject: Re: subselects
In-Reply-To: <20001202112723.A29244@gruby>
* 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