This really is my first attempt for responding to my very own question, since someone might encounter this so it might help you. Using Firebird, I wish to mix the outcomes of two queries using UNION ALL, then sort the resulting output on the given column. Something similar to:
(select C1, C2, C3 from T1) union all (select C1, C2, C3 from T2) order by C3
The parentheses originated from valid syntax for other databases, and are necessary to make certain the arguments to UNION ALL (a surgical procedure that's defined to operate on tables - i.e. an unordered group of records) create be purchased individually. However could not understand this syntax to operate in Firebird - how will it be achieved?
SELECT C1, C2, C3 FROM ( select C1, C2, C3 from T1 union all select C1, C2, C3 from T2 ) order by C3
Area names aren't needed to become equal. This is exactly why you cannot make use of the area title within the order by.
You can utilize the area index rather. As with:
(select C1, C2, C3 from T1) union all (select C7, C8, C9 from T2) order by 3
In Firebird 1.5 this works best for me
create view V1 (C1, C2, C3) as select C1, C2, C3 from T1 union all select C1, C2, C3 from T2
select C1, C2, C3 from V1 order by C3
Carry out the UNION ALL inside a view (with no ORDER BY clause), then choose in the view using ORDER BY.