Subject Re: [firebird-support] UNION - ORDER BY
Author Daniel Rail
Hi,

At December 21, 2005, 6:03 AM, Andre Dostal wrote:

> The statement doesn't work IBConsole, neither within a Delphi programm

> Is there a wrong syntax?

PARENT_ID doesn't exist in the first query other than as a field
alias. Field aliases are not supported outside of the result set. It
might be in a future version(don't ask which one). But, you can
specify the column position in the GROUP BY and ORDER BY clauses.

Try the following ORDER BY clause:
ORDER BY 2, NAME

--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)