Unique values from two queries

Gorf

Registered User.
Local time
Today, 12:54
Joined
Sep 1, 2014
Messages
14
I get the feeling this should be really simple, but in my decade-long hiatus from Access, I've lost the necessary googling skills to know what keywords I should be using.

I'm writing a simple job scheduling database, so I've got resource availability (by week) and job list (by week). I've written a single-column query whose only output is a unique list of weeks with resources available, and another single-column query whose only output is a unique list of weeks with at least one job allocated.

How do I join these so that I can get a single-column list of weeks that have either (or both) of resources and jobs?

So Query1 returns:
25/08/2014
08/09/2014
15/09/2014

while Query2 returns:
01/09/2014
08/09/2014
15/09/2014
22/09/2014

I want query3 to return:
25/08/2014
01/09/2014
08/09/2014
15/09/2014
22/09/2014

Thanks for reading :)
 
Looks like you want a UNION query.
 
Thanks - that did the trick :)
 
Just so any other newcomers know - my query in the end was the SQL statement:
SELECT qryGetActiveAvailability.WeekCommencing
FROM qryGetActiveAvailability
UNION SELECT qryGetActiveJobs.WeekCommencing
FROM qryGetActiveJobs;
 
And for more info, you can use UNION ALL to allow duplicates from the sources. Without ALL, duplicates are eliminated but the query is slightly less efficient.
 

Users who are viewing this thread

Back
Top Bottom