Skip navigation links

MySQL Forums :: MyISAM :: problem union and order by


Advanced Search

problem union and order by
Posted by: Uwe Geercken ()
Date: April 13, 2012 01:07AM

I have following query:

(
select '[All]' as airline_name
)
union
(
select
distinct airline_name
from
staging_final
order by
airline_name
)

the purpose is to have [All] at the top and then the list of airline names sorted. but the result is not sorted by airline name:

[All]
Swiss
TAP Air Portugal
KLM Royal Dutch Airlines
swiss Line Maintenance
Austrian Airlines
Adria Airways
Aer Lingus
US Airways
Air France
.....

can somebody give me a hint please how to get the result sorted?

thanks,

uwe

Options: ReplyQuote


Subject Views Written By Posted
problem union and order by 1334 Uwe Geercken 04/13/2012 01:07AM
Re: problem union and order by 831 Uwe Geercken 04/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.