Subject | Re: [firebird-support] Re: union |
---|---|
Author | Ann W. Harrison |
Post date | 2009-04-06T16:54:54Z |
danyschaer wrote:
Order by is part of the select statement, not part of the query
expression. That part of the SQL Guru Full Employment policy.
Cheers,
Ann
>The SQL standard calls the select in the union a query expression.
> The way I see that works with Firebird an the others engines (Oracle, Postgres) is:
>
> select * from (select "FECH","HECH" from "MOVI" where "HECH"='P' order by "FECH") A1
> union
> select * from (select "FECH","HECH" from "MOVI" where "HECH"='P' order by "FECH") A2
>
> Also, I can see my other approach does not work in any of the 3 engines.
>
> I was curious ... nothing else.
>
Order by is part of the select statement, not part of the query
expression. That part of the SQL Guru Full Employment policy.
Cheers,
Ann