processing results from INTERSECT, UNION or EXCEPT

From: "Jody Weissmann" <jody(at)ifi(dot)unizh(dot)ch>
To: pgsql-novice(at)postgresql(dot)org
Subject: processing results from INTERSECT, UNION or EXCEPT
Date: 2000-12-07 17:01:44
Message-ID: 3A2FC278.A4AD05D9@ifi.unizh.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I'd like to do something as follows

SELECT t1.id FROM t1 WHERE t1.id IN (SELECT t2.id FROM t2 INTERSECT
SELECT t3.id FROM t3)

i.e. use results from a set-operation.
If i do this in psql, i get an error message

ERROR: parser: parse error at or near "intersect"

Is there any way to do this besides using a temporary table?

Thanx,
Jody

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Helge Bahmann 2000-12-07 17:15:29 Re: Index creation
Previous Message Tom Lane 2000-12-07 15:41:49 Re: Index creation