How would you use a temporary table? Is that the most efficient way? David
-----Original Message----- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 11:03 AM To: Shade, Richard; [EMAIL PROTECTED] Subject: Re: MYSQL HELP Richard, > Does anyone know what is wrong with this syntax... > > Select H.FinishCode, L.RowID > From CallHistory As H, BD2.CallList As L > Where (H.CallTime in(Select MAX(CallTime) From CallHistory Where H.RowID = > L.RowID) > AND H.RowID = L.RowID); Sub-selects not (yet) permitted by MySQL (RTFM: 1.7.4.1 Sub-SELECTs) Looks like a job for two SELECTs and a temporary table... Regards, =dn --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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