E
Edgar Thoemmes
Hi
Can anyone spot an error in this SQL? I am getting an error 'Syntax error or
missing operator in query expression'
SELECT tblSpendbySupplier.SuppCode, tblSuppliers.SupplierName,
Sum(tblSpendbySupplier.Amount) AS SumOfAmount
FROM (tblSpendbySupplier INNER JOIN tblSuppliers ON
tblSpendbySupplier.SuppCode = tblSuppliers.SupplierCode) INNER JOIN
(tblGLCodes INNER JOIN tblSpendbyGL ON tblGLCodes.GLCode =
tblSpendbyGL.GLCode) ON tblSpendbySupplier.URN = tblSpendbyGL.URN
WHERE (((tblSpendbySupplier.Date) Between #01/08/2004# AND #31/08/2004#))
AND (((tblGLCodes.Industry) =IN(0,1,2) AND
((tblSpendbySupplier.TransactionType) = 4))
GROUP BY tblSpendbySupplier.SuppCode, tblSuppliers.SupplierName,
tblSpendbySupplier.URN, tblGLCodes.Industry,
tblSpendbySupplier.TransactionType
ORDER BY Sum(tblSpendbySupplier.Amount) DESC;
Thanks
Edgar
Can anyone spot an error in this SQL? I am getting an error 'Syntax error or
missing operator in query expression'
SELECT tblSpendbySupplier.SuppCode, tblSuppliers.SupplierName,
Sum(tblSpendbySupplier.Amount) AS SumOfAmount
FROM (tblSpendbySupplier INNER JOIN tblSuppliers ON
tblSpendbySupplier.SuppCode = tblSuppliers.SupplierCode) INNER JOIN
(tblGLCodes INNER JOIN tblSpendbyGL ON tblGLCodes.GLCode =
tblSpendbyGL.GLCode) ON tblSpendbySupplier.URN = tblSpendbyGL.URN
WHERE (((tblSpendbySupplier.Date) Between #01/08/2004# AND #31/08/2004#))
AND (((tblGLCodes.Industry) =IN(0,1,2) AND
((tblSpendbySupplier.TransactionType) = 4))
GROUP BY tblSpendbySupplier.SuppCode, tblSuppliers.SupplierName,
tblSpendbySupplier.URN, tblGLCodes.Industry,
tblSpendbySupplier.TransactionType
ORDER BY Sum(tblSpendbySupplier.Amount) DESC;
Thanks
Edgar