Re: [SQL] Using intersect in subquery - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: [SQL] Using intersect in subquery
Date
Msg-id 199908180238.WAA12634@candle.pha.pa.us
Whole thread Raw
In response to Using intersect in subquery  ("Hamid Khoshnevis" <hamid@emarq.com>)
Responses Re: [SQL] Using intersect in subquery  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Try 6.5.  We fixed some Intersect stuff.

[Charset iso-8859-1 unsupported, filtering to ASCII...]
> 
> I have tried to use intersect in subquery causing the following error.
> Please help!
> ERROR:  parser: parse error at or near "intersect"
> 
> 
> select * from Table1
> where KeyField1 in
> (select KeyField2 from Table2 where  somecondition
> intersect
> select KeyField3 from Table3  where somecondition);
> 
> (I believe) I am running PG 6.4.  The INTERSECT by itself works, but not in
> a subquery.
> 
> Thanks!
> 
> hamid
> 
> 
> 
> 


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: "Hamid Khoshnevis"
Date:
Subject: Using intersect in subquery
Next
From: Oleg Bartunov
Date:
Subject: Re: [SQL] index on more-than-one columns?