I have the following SQL:
SELECT A.FormulaName, [cost]+8.34*[specificgravity] AS QBCost, [qbcost]*2.5 AS Retail, D.PLCost, D.PLRetail, D.QuotedRetail, Sum(A.specificgravity*B.percentage*8.34*C.total_Cost) AS cost, E.Description
FROM (((tblproduct AS A LEFT JOIN tblprices AS D ON A.FormulaNumber = D.ProductNumber) LEFT JOIN tblpricelist AS E ON A.FormulaName = E.ProductName) INNER JOIN tblingredients AS B ON A.FormulaNumber = B.FormulaNumber) INNER JOIN tblcost AS C ON B.Ingredient = C.NAME
GROUP BY A.FormulaName, [qbcost]*2.5, D.PLCost, D.PLRetail,retail ;
I am getting this error:
You tried to execute a query that doesn't include the specified expression 'Description' as part of an aggregate function.
Chris
SELECT A.FormulaName, [cost]+8.34*[specificgravity] AS QBCost, [qbcost]*2.5 AS Retail, D.PLCost, D.PLRetail, D.QuotedRetail, Sum(A.specificgravity*B.percentage*8.34*C.total_Cost) AS cost, E.Description
FROM (((tblproduct AS A LEFT JOIN tblprices AS D ON A.FormulaNumber = D.ProductNumber) LEFT JOIN tblpricelist AS E ON A.FormulaName = E.ProductName) INNER JOIN tblingredients AS B ON A.FormulaNumber = B.FormulaNumber) INNER JOIN tblcost AS C ON B.Ingredient = C.NAME
GROUP BY A.FormulaName, [qbcost]*2.5, D.PLCost, D.PLRetail,retail ;
I am getting this error:
You tried to execute a query that doesn't include the specified expression 'Description' as part of an aggregate function.
Chris