Kaloyan Iliev Iliev <[EMAIL PROTECTED]> writes:
>  I have the following problem:

> select
> .....
> from
> ....
> where
> ....
>  UNION ALL

> select
> ...
> from
> ....
> where
> ....
> ORDER BY field1

> But the the order by doesn't work properly. It returns the rows of the 
> first query ordered and then appends the rows of the second query 
> ordered.

Pray tell, what Postgres release are you using?

AFAICT this will result in an overall sort in all PG releases since 7.0.
I don't have anything older to test...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to