Hi,
I am having trouble trying to order the results of a Union query, which is in turn based on 2 other Union queries and one table query.
The reason for this is because each of the 2 Union queries collate data from 5 tables each, and perform their own sorting. The single table query simply holds a separator record of various characters.
Here is the SQL for the final Union Query:
Code:
SELECT *, Name
FROM Q000_DepositUnion_UnProcessedTransLive
UNION SELECT *
FROM Q000_Separator_UnProcessedTrans
UNION SELECT *
FROM Q000_DepositUnion_UnProcessedTransArchive;
So there we have the first Union Query, followed by the separator, followed by the second Union Query. No Order applied.
I expected the result set to display as they are defined in the query, but they don't. They seem to order by the first column of the result set.
I have done searches on Native ordering with no luck. Does anyone know if there is a way to Order By the declaration order of the objects?
Aaron