I am converting an Access95 DB to mySQL. The interface will remain in Access95. I encountered a problem with one of the existing queries. The code for the query is:
SELECT DISTINCTROW ManualChecksPrinted.AccountNum, ManualChecksPrinted.CheckNumber, ManualChecksPrinted.AccountID, ManualChecksPrinted.PayeeID, ManualChecksPrinted.CheckPayee, ManualChecksPrinted.CheckDate, ManualChecksPrinted.CheckAmount FROM ManualChecksPrinted WHERE (((ManualChecksPrinted.AccountNum) In (SELECT [AccountNum] FROM [ManualChecksPrinted] As Tmp GROUP BY [AccountNum],[CheckNumber] HAVING Count(*)>1 And [CheckNumber] = [ManualChecksPrinted].[CheckNumber]))) ORDER BY ManualChecksPrinted.AccountNum, ManualChecksPrinted.CheckNumber; The problem is in the WHERE clause. I get the ODBC--call failed message box, and the following: [MySQL][ODBC 3.51 Driver][mysqld-4.0.17-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(SELECT `MS2`.`AccountNum` FROM `manualchecksprinted` `MS2` GR (#1064) I am a newbie to MySQL so all help is greatly appreciated. If more information is required, please let me know. Keith Hill [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]