I'm not getting the behavior I expect from this select.

SELECT available.target, tracked.sensor
FROM available LEFT JOIN tracked ON available.target=tracked.target
WHERE available.window=137 AND tracked.window=137 AND available.sensor=8;

Now, I know for this window, that there are 25 records for sensor 8 in the
available table:

SELECT count(*) FROM available WHERE window=137 AND sensor=8;

count(*)
25

Now in the tracked table, some of the targets that are available to sensor 8
are actually tracked by another sensor, and some are not tracked at all.  I
expected the left join to show me which targets that are available to target
8 are tracked by which sensor, with NULL values in the right column for
targets that are left untracked.

I get half of that.  My result set has 20 records.  It correctly shows which
sensor tracked which target. It doesn't show the 4 untracked targets at all?

Ideas?
Thanks
Eric

---------------------------------------------------------------------
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

Reply via email to