From: Alex Guryanow <gav@nlr.ru>
To: pgsql-sql@postgresql.org
Subject: using INTERSECT and UNION in IN clause
Date: Tue, 22 Aug 2000 14:03:42 +0400
Message-ID: <6585.000822@nlr.ru> (raw)
Hi,
postgresql 7.0.2. Why by executing the following query
select * from magazine
where id in (
select mag_id from dict where word = 'akademie' intersect
select mag_id from dict where word = 'der' intersect
select mag_id from dict where word = 'klasse' )
I receive the following error:
ERROR: parse error at or near 'intersect'
while the query
select mag_id from dict where word = 'akademie' intersect
select mag_id from dict where word = 'der' intersect
select mag_id from dict where word = 'klasse' )
is executed successfully.
Is it possible to use INTERSECT and UNION keywords in subqueries?
Regards,
Alex
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: gav@nlr.ru
Subject: Re: using INTERSECT and UNION in IN clause
In-Reply-To: <6585.000822@nlr.ru>
References: <6585.000822@nlr.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox