Re: subselects - Mailing list pgsql-sql

From Joseph Shraibman
Subject Re: subselects
Date
Msg-id 3A2EA03A.D36F74B2@selectacast.net
Whole thread Raw
In response to subselects  (Joseph Shraibman <jks@selectacast.net>)
List 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@selectacast.net
Increase signal to noise ratio.  http://www.targabot.com


pgsql-sql by date:

Previous
From: rocael@usa.net
Date:
Subject: pltcl problem
Next
From:
Date:
Subject: pltcl problem