T
That Crazy Hockey Dood
Good Morning..
I have a question regarding my query and forcing null to show zero. Here is
the SQL:
SELECT Sum([EOSetups]+[FBOrders]+[NewAccounts]+[NCR]+[Admin
Activity_tbl]!OTML+[Pieces]+[ShowsPacked]+[ILSQuotes]+[INTLQuotes]+[DoNotExceed]+[Emails]+[Orders]+[NACallbacks]+[KeyAcctSales]+[Notes]+[FollowUp]+[ICSIndexed]+[Mail]+[CreditProcessing]+[IPSReturnabilities]+[ConsumerCatalogs]+[ReturnedMail]+[PRP]+[HeldOrders]+[VCommerce]+[QAEdits]+[QMEvaluations]+[IPSFax]+[IPSEmail]+[eBooks])
AS AdminTotal,
Sum([CallCenterCalls]+[OperationsCalls]+[AdministrationCalls]+[CostcoCalls]+[CSEmail]+[ILSEmail]+[INTLEmail]+[FaxOrders]+[EmlOrders]+[ILSFaxandEmailOrders]+[CDFEmail]+[CustCareEmail])
AS CallCenterTotal,
Sum([ProcessedTracers]+[OpsEmail]+[PIF]+[WIF]+[FaxedPL]+[Callbacks]+[CALetters]+[NoteCodeChanges]+[ShipdeskFU]+[NotesandFU]+[RSPONSEFU]+[FrtQuotes]+[HFForms]+[OSForms]+[CriticalCare]+[Returns]+[CCOPStoIC]+[PTOExpedited]+[PTOCancels]+[ACO]+[BNAirReq]+[SalesSupportCalls]+[SalesSupportEmail])
AS OpsTotal,
Sum([WorkOrders]+[BinderyShipments]+[BPNotes]+[FollowUps]+[EmailOrders]+[EmailCS]+[iPageOrders]+[TaschenYourPay]+[Allocations]+[IPSNewAcct])
AS PubCareTotal, tblPayroll.Payroll
FROM [Admin Activity_tbl], [Call Center Activity_tbl], CCOPS_tbl, [Pub
Care_tbl], tblPayroll
WHERE ((([Admin Activity_tbl].Month)=[Forms]![Monthly CPT]![Month]) AND
(([Admin Activity_tbl].Year)=[Forms]![Monthly CPT]![Year]) AND (([Call Center
Activity_tbl].Month)=[Forms]![Monthly CPT]![Month]) AND (([Call Center
Activity_tbl].Year)=[Forms]![Monthly CPT]![Year]) AND
((CCOPS_tbl.Month)=[Forms]![Monthly CPT]![Month]) AND
((CCOPS_tbl.Year)=[Forms]![Monthly CPT]![Year]) AND (([Pub
Care_tbl].Month)=[Forms]![Monthly CPT]![Month]) AND (([Pub
Care_tbl].Year)=[Forms]![Monthly CPT]![Year]) AND
((tblPayroll.Month)=[Forms]![Monthly CPT]![Month]) AND
((tblPayroll.Year)=[Forms]![Monthly CPT]![Year]))
GROUP BY tblPayroll.Payroll;
I have tried several things like:
Nz(Sum([CallCenterCalls]+[OperationsCalls]+[AdministrationCalls]+[CostcoCalls]+[CSEmail]+[ILSEmail]+[INTLEmail]+[FaxOrders]+[EmlOrders]+[ILSFaxandEmailOrders]+[CDFEmail]+[CustCareEmail]),0)
and Sum(Nz([CallCenterCalls]),0)+etc.. However I am not able to get the
desired results. Am I missing something here?
Also, I wondered if I have gone the long way to get my results. This query
is triggered by a form which is run passing the selected month and year to
get the data for the text boxes on the form. The current query is a result
of trial and error.
Thanks in advance for your time and suggestions.
Jim
I have a question regarding my query and forcing null to show zero. Here is
the SQL:
SELECT Sum([EOSetups]+[FBOrders]+[NewAccounts]+[NCR]+[Admin
Activity_tbl]!OTML+[Pieces]+[ShowsPacked]+[ILSQuotes]+[INTLQuotes]+[DoNotExceed]+[Emails]+[Orders]+[NACallbacks]+[KeyAcctSales]+[Notes]+[FollowUp]+[ICSIndexed]+[Mail]+[CreditProcessing]+[IPSReturnabilities]+[ConsumerCatalogs]+[ReturnedMail]+[PRP]+[HeldOrders]+[VCommerce]+[QAEdits]+[QMEvaluations]+[IPSFax]+[IPSEmail]+[eBooks])
AS AdminTotal,
Sum([CallCenterCalls]+[OperationsCalls]+[AdministrationCalls]+[CostcoCalls]+[CSEmail]+[ILSEmail]+[INTLEmail]+[FaxOrders]+[EmlOrders]+[ILSFaxandEmailOrders]+[CDFEmail]+[CustCareEmail])
AS CallCenterTotal,
Sum([ProcessedTracers]+[OpsEmail]+[PIF]+[WIF]+[FaxedPL]+[Callbacks]+[CALetters]+[NoteCodeChanges]+[ShipdeskFU]+[NotesandFU]+[RSPONSEFU]+[FrtQuotes]+[HFForms]+[OSForms]+[CriticalCare]+[Returns]+[CCOPStoIC]+[PTOExpedited]+[PTOCancels]+[ACO]+[BNAirReq]+[SalesSupportCalls]+[SalesSupportEmail])
AS OpsTotal,
Sum([WorkOrders]+[BinderyShipments]+[BPNotes]+[FollowUps]+[EmailOrders]+[EmailCS]+[iPageOrders]+[TaschenYourPay]+[Allocations]+[IPSNewAcct])
AS PubCareTotal, tblPayroll.Payroll
FROM [Admin Activity_tbl], [Call Center Activity_tbl], CCOPS_tbl, [Pub
Care_tbl], tblPayroll
WHERE ((([Admin Activity_tbl].Month)=[Forms]![Monthly CPT]![Month]) AND
(([Admin Activity_tbl].Year)=[Forms]![Monthly CPT]![Year]) AND (([Call Center
Activity_tbl].Month)=[Forms]![Monthly CPT]![Month]) AND (([Call Center
Activity_tbl].Year)=[Forms]![Monthly CPT]![Year]) AND
((CCOPS_tbl.Month)=[Forms]![Monthly CPT]![Month]) AND
((CCOPS_tbl.Year)=[Forms]![Monthly CPT]![Year]) AND (([Pub
Care_tbl].Month)=[Forms]![Monthly CPT]![Month]) AND (([Pub
Care_tbl].Year)=[Forms]![Monthly CPT]![Year]) AND
((tblPayroll.Month)=[Forms]![Monthly CPT]![Month]) AND
((tblPayroll.Year)=[Forms]![Monthly CPT]![Year]))
GROUP BY tblPayroll.Payroll;
I have tried several things like:
Nz(Sum([CallCenterCalls]+[OperationsCalls]+[AdministrationCalls]+[CostcoCalls]+[CSEmail]+[ILSEmail]+[INTLEmail]+[FaxOrders]+[EmlOrders]+[ILSFaxandEmailOrders]+[CDFEmail]+[CustCareEmail]),0)
and Sum(Nz([CallCenterCalls]),0)+etc.. However I am not able to get the
desired results. Am I missing something here?
Also, I wondered if I have gone the long way to get my results. This query
is triggered by a form which is run passing the selected month and year to
get the data for the text boxes on the form. The current query is a result
of trial and error.
Thanks in advance for your time and suggestions.
Jim