witsendestate
Starting Member
1 Post |
Posted - 2012-08-12 : 20:57:35
|
Hi Team,I have the following 3 queries that each generate a report.. What Im trying to do is create 1 report that has all 3 queries on it..Each query is for a list of pickerids which are within 1 of 3 teams.. I need to keep these separate to compare results.Here are the 3 queries.. only the pickerid's are different in each query... I execute these queries from a macro with Access 2007.Appreciate your helpQuery 1.SELECT Pickerid, Pickername, ROUND(SUM(totalweight), 2) AS PickersTotalWeight, SUM(totalweight)/ROUND(SUM(pickerhours)) AS HourlyRateFROM (SELECT pickerid,currentdate,pickerhours,pickername,SUM(currentweight) AS totalweightFROM mergeddatabasewhere pickerid in (11, 16, 19, 22, 26, 29, 37, 39, 40, 42, 44, 46, 47, 49)GROUP BY pickerid,currentdate,pickerhours,pickername) AS [%$##@_Alias]WHERE ((currentdate between [Enter first date:] AND [Enter last date:]) and (pickerhours > 0.1))GROUP BY pickerid, pickernameORDER BY 4 DESC;Query 2.SELECT Pickerid, Pickername, ROUND(SUM(totalweight), 2) AS PickersTotalWeight, SUM(totalweight)/ROUND(SUM(pickerhours)) AS HourlyRateFROM (SELECT pickerid,currentdate,pickerhours,pickername,SUM(currentweight) AS totalweightFROM mergeddatabaseWHERE PICKERID IN (2,3,5,8,9,13,15,17,23,27,28,32,34,50 )GROUP BY pickerid,currentdate,pickerhours,pickername) AS [%$##@_Alias]WHERE ((currentdate between [Enter first date:] AND [Enter last date:]) and (pickerhours > 0.1))GROUP BY pickerid, pickernameORDER BY 4 DESC;Query 3.SELECT Pickerid, Pickername, ROUND(SUM(totalweight), 2) AS PickersTotalWeight, SUM(totalweight)/ROUND(SUM(pickerhours)) AS HourlyRateFROM (SELECT pickerid,currentdate,pickerhours,pickername,SUM(currentweight) AS totalweightFROM mergeddatabaseWHERE PICKERID IN (2,3,5,8,9,13,15,17,23,27,28,32,34,50 )GROUP BY pickerid,currentdate,pickerhours,pickername) AS [%$##@_Alias]WHERE ((currentdate between [Enter first date:] AND [Enter last date:]) and (pickerhours > 0.1))GROUP BY pickerid, pickernameORDER BY 4 DESC;RegardsMark |
|