UPDATE: Still trying to solve this and I think I have something that's a little easier to understand. If I run the following query against MySQL it returns "Unknown column 'Obsolete' in 'having clause'". If I run the query using MSAccess as a frontend to MySQL the query runs correctly (it returns a recordset with 9 records). If I remove the Obsolete column from the Having clause the MySQL server appears to hang up while it processes the query but it never returns even if left for an hour.
Please, has anyone got any ideas? SELECT Products.PartNumber, Sum(tblInvTransaction.Qty) AS SumOfQty FROM Products LEFT JOIN tblInvTransaction ON Products.ProductID = tblInvTransaction.ProductID GROUP BY Products.PartNumber HAVING ((Products.PartNumberLike "%A-000%") AND (Products.Obsolete<>-1)) ORDER BY Products.PartNumber; --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php