INTERSECT AND ORDER BY

From: Gary DeSorbo <isasitis(at)uchicago(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: INTERSECT AND ORDER BY
Date: 2001-06-13 18:59:27
Message-ID: v04210106b74d66d613fe@[172.16.0.83]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am trying to use the query below:

SELECT date_worked, hours_worked
FROM hours
WHERE date_worked < '8/15/2001'
INTERSECT
SELECT date_worked, hours_worked
FROM hours
WHERE date_worked > '8/8/2001'
ORDER BY date_worked

but Postgres does not seem to like the ORDER BY clause. Does
anyone know if it is possible to use ORDER BY in conjunction with an
INTERSECT statement? Does anyone have any alternative suggestions? I
cannot use a temporary table because this is a Web-based application.
Thanks in advance for your help.

Gary

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Wall 2001-06-13 19:04:17 Vacuum analyze in 7.1.1
Previous Message Nils Zonneveld 2001-06-13 18:58:12 Re: total newbie question