sorting a union query

  • Thread starter Thread starter karerda
  • Start date Start date
K

karerda

Guest
Hallo,
i have a very simple union query that populate a combobox. I would like it to be in alphateical order but srangeli it doesnt' work.

SELECT tbl_Country.Cou_ID, tbl_Country.Cou_Name FROM tbl_Country ORDER BY tbl_Country.Cou_Name UNION SELECT "*", "<All>" FROM tbl_Country;

I don't why but if I leave out the union statement it will display correctly:

SELECT tbl_Country.Cou_ID, tbl_Country.Cou_Name FROM tbl_Country ORDER BY tbl_Country.Cou_Name;

any ideas?
 
i think you need to move your order by
SELECT tbl_Country.Cou_ID, tbl_Country.Cou_Name FROM tbl_Country
UNION SELECT "*", "<All>" FROM tbl_Country
ORDER BY tbl_Country.Cou_Name
 
thanks bjackson, this works
 

Users who are viewing this thread

Back
Top Bottom