A
amauricio2
Can someone tell me what is wrong with my query
SELECT MTCQ.MONTH, MTCQ.YEAR, MTCQ.DISTRIBUTOR, MTCQ.UPC, MTCQ.[ITEM
DESCRIPTION], MTCQ.SIZE, MTCQ.[CASE PACK], MTCQ.[DIRECT IMPORT], MTCQ.[BDM
STATUS], Sum(MTCQ.tncp) AS SumOftncp, Sum([Tbl_Cumm Actual Results].[BILL
UNITS]) AS [SumOfBILL UNITS], Sum(([BILL UNITS]/[CASE PACK])) AS [BILL CASES],
Sum([Tbl_Cumm Actual Results].[SALES UNITS]) AS [SumOfSALES UNITS], Sum((
[SALES UNITS]/[CASE PACK])) AS [SALES CASES]
FROM MTCQ INNER JOIN [Tbl_Cumm Actual Results] ON (MTCQ.UPC = [Tbl_Cumm
Actual Results].UPC) AND (MTCQ.[CORPORATE NUMBER] = [Tbl_Cumm Actual Results].
[CORPORATE NUMBER]) AND (MTCQ.[START DATE] = [Tbl_Cumm Actual Results].[START
DATE])
GROUP BY MTCQ.MONTH, MTCQ.YEAR, MTCQ.DISTRIBUTOR, MTCQ.UPC, MTCQ.[ITEM
DESCRIPTION], MTCQ.SIZE, MTCQ.[CASE PACK], MTCQ.[DIRECT IMPORT], MTCQ.[BDM
STATUS]
HAVING (((MTCQ.MONTH)=[What Month?]) AND ((MTCQ.YEAR)=[What Year?]) AND (
(MTCQ.[BDM STATUS])="APPROVED"));
This query will work for Jan through July then give me the "This expression
is typed incorrectly, or it is too complex to be evaluated" error. I really
appreciate your help folks!!
SELECT MTCQ.MONTH, MTCQ.YEAR, MTCQ.DISTRIBUTOR, MTCQ.UPC, MTCQ.[ITEM
DESCRIPTION], MTCQ.SIZE, MTCQ.[CASE PACK], MTCQ.[DIRECT IMPORT], MTCQ.[BDM
STATUS], Sum(MTCQ.tncp) AS SumOftncp, Sum([Tbl_Cumm Actual Results].[BILL
UNITS]) AS [SumOfBILL UNITS], Sum(([BILL UNITS]/[CASE PACK])) AS [BILL CASES],
Sum([Tbl_Cumm Actual Results].[SALES UNITS]) AS [SumOfSALES UNITS], Sum((
[SALES UNITS]/[CASE PACK])) AS [SALES CASES]
FROM MTCQ INNER JOIN [Tbl_Cumm Actual Results] ON (MTCQ.UPC = [Tbl_Cumm
Actual Results].UPC) AND (MTCQ.[CORPORATE NUMBER] = [Tbl_Cumm Actual Results].
[CORPORATE NUMBER]) AND (MTCQ.[START DATE] = [Tbl_Cumm Actual Results].[START
DATE])
GROUP BY MTCQ.MONTH, MTCQ.YEAR, MTCQ.DISTRIBUTOR, MTCQ.UPC, MTCQ.[ITEM
DESCRIPTION], MTCQ.SIZE, MTCQ.[CASE PACK], MTCQ.[DIRECT IMPORT], MTCQ.[BDM
STATUS]
HAVING (((MTCQ.MONTH)=[What Month?]) AND ((MTCQ.YEAR)=[What Year?]) AND (
(MTCQ.[BDM STATUS])="APPROVED"));
This query will work for Jan through July then give me the "This expression
is typed incorrectly, or it is too complex to be evaluated" error. I really
appreciate your help folks!!