| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Gary DeSorbo <isasitis(at)uchicago(dot)edu> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: INTERSECT AND ORDER BY |
| Date: | 2001-06-13 21:31:13 |
| Message-ID: | 3084.992467873@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2001-06-13 21:33:25 | Re: Vacuum analyze in 7.1.1 |
| Previous Message | Lamar Owen | 2001-06-13 21:26:22 | Re: Log files, how to rotate properly |