Re: Sv: how to build this query ??? Please help !!!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Sv: how to build this query ??? Please help !!!
Date: 2001-01-09 04:09:14
Message-ID: 29568.979013354@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Robert B. Easter" <reaster(at)comptechnews(dot)com> writes:
> -- this crashes
> select a, (SELECT b FROM y WHERE y.b = x.a + 1) AS b
> FROM x WHERE a IN (SELECT b FROM y)
> GROUP BY a,b
> HAVING a IN (SELECT b FROM y WHERE b > 1);

Fixed. 'Twas another case of trying to close a subplan twice ...

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Robert B. Easter 2001-01-09 07:06:30 subselect test
Previous Message Jie Liang 2001-01-09 01:16:24 hex number