Jeremy Cole wrote:
Hi,
Both tables should hold the same number of records.
However, I've discovered that 'Close' is one less than 'Open' (1693 vs 1694).
How can I find out which record is missing from 'Close'? I know it's not the case of an extra entry in 'Open' because 1694 divides evenly by 7, whereas 1693 doesn't.
This should do it:
SELECT Open.id, Open.day FROM Open LEFT JOIN Close ON Open.id=Close.id AND Open.day=Close.day WHERE Close.id IS NULL
Regards,
Jeremy
Excellent! Thank you. I had tried a few left joins but none of them worked.
-- Amer Neely, Softouch Information Services Home of Spam Catcher W: www.softouch.on.ca E: [EMAIL PROTECTED] Perl | PHP | MySQL | CGI programming for all data entry forms. "We make web sites work!"
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
