View Single Post
  #1  
Old June 1st, 2010, 09:30 PM posted to microsoft.public.access.queries
SSi308
external usenet poster
 
Posts: 42
Default Union Query and Field Alias

I have created a union query and now want to create a field alias to specify
which records come from which query.
The union query works as such:
SELECT * FROM [qryTodBefore10]
UNION
SELECT * FROM [qryTod10To12]
UNION
SELECT * FROM [qryTod12To2]
UNION
SELECT * FROM [qryTodAfter2];


But when I try to add the field alias I get the error: Syntax Error in From
clause. The error is not any more specific than that. I have tried so many
different statements I thought it may be better to just ask: What is the
correct syntax to add a field alias called [TimeOfDay]?

Thanks.

Lori