Re: subselects

From: Joseph Shraibman <jks(at)selectacast(dot)net>
To: depesz(at)depesz(dot)pl
Cc: PGSQL-SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: subselects
Date: 2000-12-06 20:23:22
Message-ID: 3A2EA03A.D36F74B2@selectacast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

hubert depesz lubaczewski wrote:
>
> 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
>

Because in my case I'm dynamically generated the select by passing in
some String values, which are inserted into SELECT x,x,x from mytable so
I can't do a simple join.

--
Joseph Shraibman
jks(at)selectacast(dot)net
Increase signal to noise ratio. http://www.targabot.com

In response to

  • Re: subselects at 2000-12-02 10:27:23 from hubert depesz lubaczewski

Browse pgsql-sql by date

  From Date Subject
Next Message rocael 2000-12-07 08:56:00 pltcl problem
Previous Message Bruno Boettcher 2000-12-06 18:10:40 HELP: can i have a trigger before postgres tries to check data types?