Gary DeSorbo <isasitis(at)uchicago(dot)edu> writes:
> 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.
Ignoring the fact that this is a tremendously inefficient way to do it
(cf. Bruno Wolff's response nearby), it should have worked. At least
in 7.1, I don't see a problem. Before 7.1 INTERSECT and EXCEPT had
some limitations ...
regards, tom lane