Order of a union query

W

Warrio

Hi everyone!

is it possible to have order by criteria common to two queries joined by a
union?
I can put an order by statement in each select, but the order is separated
into two parts

Select * from Table1 Order by Table1.Field1
Union
Select * from Table2 Order by Table2.Field1

how can I select the fields from the two table and having the result ordered
as hole part?

Thanks for any suggestion
 
T

Tom Ellison

Dear Warrio:

To order a union, place the ORDER BY after the last SELECT query. It
will apply to all the data in those columns. Be advised that the
first SELECT determines the column names you would use in the ORDER
BY.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Top