View Full Version : Collecting results from multiple queries without appending


martinzima
05-06-2008, 11:19 PM
Hi,

I am trying to calculate FTE over a 3 month period. I have broken the calculations into seperate queries to make it easier (e.g. first searching for people that have been present the whole quarter (FTE=1), then people who started part way through (FTE=0.XX - depending what day they joined), people who left part way through... etc...)

I now need to merge all the results together and run a report on the combined results. The query is also parameterised so I don't want to use an append query if at all possible, is there any other way round this?

QUARTER JOINERS CODE:
SELECT Employees.EmployeeID, Employees.FirstName, Employees.LastName, Employees.StartDate
FROM Employees, [Quarter Selector]
WHERE (((Employees.StartDate)>=[Quarter Selector].[StartDate]) AND ((Employees.EndDate) Is Null));

QUARTER SELECTOR CODE:
SELECT Quarters.Description, Quarters.StartDate
FROM Quarters
WHERE (((Quarters.Description)=[Quarter name:]));

Dennisk
05-06-2008, 11:39 PM
you can use a UNION query to combine the results however the number of columns needs to be the same in all queries but you can use constants if there is a query that does not return the corrent number of columns.