List:General Discussion« Previous MessageNext Message »
From:Andrew Zahn Date:June 13 2006 8:03pm
Subject:MS access query in mysql
View as plain text  
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

Thread
MS access query in mysqlAndrew Zahn13 Jun
  • Re: MS access query in mysqlPeter Brawley13 Jun
    • Re: MS access query in mysqlAndrew Zahn15 Jun