Re: problem union and order by
ok. I found the trick that does it: instead of ordering the second query (which does ot work), I have added a field "ordinal" and then I order the whole result first by the ordinal and then the airline name.
(
select '[All]' as airline_name,0 as ordinal
)
union
(
select
distinct airline_name,1 as ordinal
from
staging_final
)
order by ordinal, airline_name
Subject
Views
Written By
Posted
2592
April 13, 2012 01:07AM
Re: problem union and order by
1641
April 13, 2012 01:36AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.