I am using MS Access to read from a MySQL database. The query generated
through access listed below returns incorrect data when executed in
Access and doesn't work at all in MySQL. I believe it has to Last() and
with the # symbols around the date. Any insight into this problem would
be greatly appreciated.
SELECT ReturnTbl.ComponentID, ReturnTbl.PartDescription,
Sum(ReturnTbl.Quantity) AS SumOfQuantity, Last(CompVendorListTbl.Cost)
AS LastOfCost
FROM ReturnTbl LEFT JOIN CompVendorListTbl ON ReturnTbl.ComponentID =
CompVendorListTbl.ComponentID
WHERE (((ReturnTbl.Date)<#2/1/2006#))
GROUP BY ReturnTbl.ComponentID, ReturnTbl.PartDescription,
ReturnTbl.USL, ReturnTbl.RtnMfgr
HAVING (((Sum(ReturnTbl.Quantity))<>0) AND ((ReturnTbl.USL)=0) AND
((ReturnTbl.RtnMfgr)=0))
ORDER BY ReturnTbl.PartDescription;
Thanks,
Andrew Zahn
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]