I'm not currently on the mailing list so please reply directly.
I have three tables joined as follows (Table WORKPLACE is just a codes
lookup with wrk_id and name):
MEMBERS(A) | EMPLOY(B) | WORKPLACE(C)
------------------------------------------
mem_id >> mem_id
workplace >> wrk_id
I want to select elements from from all three tables but run into a problem
where B.workplace is NULL (i.e. members are excluded from result set where
B.workplace has been left blank (no join between B and C).
I know this can be solved using and outer/left join but I can't seem to get
the syntax right to get elements from all three tables.
Another solution I can think of is to replace all the NULL's in EMPLOY(B)
with a logical value and then insert a corresponding entry in the lookup
table WORKPLACE(C). I would also set the default for EMPLOY.workplace to be
the same.
_________________________________
Scott Gerhardt, P.Geo.
Gerhardt Information Technologies
_________________________________
---------------------------------------------------------------------
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