T
tankerman
I have a report that shows me all activity at our docks for a give time
frame, SQL is below. This report works just fine but now that we have had
this db for a year my manager wants me to
compare 2009 to 2008 in months and years totals, show each months amounts,
difference in number of handlings, as well difference by percentage and
yearly as well.
I can get the raw numbers by my query which I would need one for the 2008
month and then one for the year and same for 2009.
My question is how to combine all 4 into one report or is that possible.
SELECT Count(tblEventsDetails.ProductCode) AS CountOfProductCode,
tblEventsDetails.ProductCode, Count(tblEventsDetails.ActivityName) AS
CountOfActivityName, tblEventsDetails.ActivityName, tblDocks.DockCode
FROM tblDocks INNER JOIN tblEventsDetails ON tblDocks.DockCode =
tblEventsDetails.DockCode
WHERE (((tblEventsDetails.FinishTime) Between
[Forms]![frmEventsCalendar].[EStart] And [Forms]![frmEventsCalendar].[EEnd]))
GROUP BY tblEventsDetails.ProductCode, tblEventsDetails.ActivityName,
tblDocks.DockCode;
frame, SQL is below. This report works just fine but now that we have had
this db for a year my manager wants me to
compare 2009 to 2008 in months and years totals, show each months amounts,
difference in number of handlings, as well difference by percentage and
yearly as well.
I can get the raw numbers by my query which I would need one for the 2008
month and then one for the year and same for 2009.
My question is how to combine all 4 into one report or is that possible.
SELECT Count(tblEventsDetails.ProductCode) AS CountOfProductCode,
tblEventsDetails.ProductCode, Count(tblEventsDetails.ActivityName) AS
CountOfActivityName, tblEventsDetails.ActivityName, tblDocks.DockCode
FROM tblDocks INNER JOIN tblEventsDetails ON tblDocks.DockCode =
tblEventsDetails.DockCode
WHERE (((tblEventsDetails.FinishTime) Between
[Forms]![frmEventsCalendar].[EStart] And [Forms]![frmEventsCalendar].[EEnd]))
GROUP BY tblEventsDetails.ProductCode, tblEventsDetails.ActivityName,
tblDocks.DockCode;