>I came up with the following sql statement, but I still don't see any >records that are missing in table active_monitors, I assume i am abusing the >'join syntax' but I don't know how to fix it: > >select D.monitor, D.endpoint ,A.monitor >from endpoints_defined_monitors D >left outer join active_monitors A >on A.monitor_id = D.monitor_ID >and A.endpoint = D.endpoint >and A.sentry_profile = D.sentry_profile >
Where D.monitor_id is null following the outer join, d.endpoint will also be null hence a.endpoint = d.endpoint evaluates to false. Chuck a few 'or is null's in and away you go. Jon --------------------------------------------------------------------- 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