set the order for column in union query

109bow

Registered User.
Local time
Today, 14:06
Joined
Oct 24, 2007
Messages
141
Hi, I have just discovered union queries and have been able to combine 3 queries,
SELECT * FROM [110 last turn]
UNION SELECT * FROM [120s last turn]
UNION SELECT * FROM [110s last turn]
but the union query appears to set the order based on the numerical value in the first column of the query.
How to I get the union query to return the results in order I would expect in the above code.
Thanks in advance
 

Attachments

At worst, call the UNION query as the source for a second query that contains an ORDER BY clause. This presumes that the three tables you name all have the same field structure.

Side note: It is not considered wise to include field or table names with spaces in them because it makes you type more (thus possibly increasing exposure to typos) and because if you EVER decided to take this to an SQL-based back-end engine, it is about a 95% chance that it won't allow the spaces no matter WHAT syntax you tried to use.
 
thanks for your reply. as a novice to access I didn't realise the impact of spaces when naming objects and yes it is beginning to haunt me.
As for ordering my union query I'm afraid I do not understand what you are suggesting. Does it make any difference if I change the column format from numerical to text
 

Users who are viewing this thread

Back
Top Bottom