Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id WAA59079 for ; Tue, 17 Aug 1999 22:38:18 -0400 (EDT) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id WAA12634; Tue, 17 Aug 1999 22:38:13 -0400 (EDT) From: Bruce Momjian Message-Id: <199908180238.WAA12634@candle.pha.pa.us> Subject: Re: [SQL] Using intersect in subquery In-Reply-To: <001f01bee91c$bc180740$810a0a0a@local.dom> from Hamid Khoshnevis at "Aug 17, 1999 06:55:23 pm" To: Hamid Khoshnevis Date: Tue, 17 Aug 1999 22:38:13 -0400 (EDT) CC: pgsql-sql@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL56 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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, Pennsylvania 19026