> 
> In MySQL, I need to do a multi table join in the context of a left 
join.  Have three
> tables: NAME, ADDRESS, and COUNTRY.  Address contains a country code 
(ie
> "CAN") and COUNTRY contains the translation (ie Canada).  What I'd 
like to
> do is get all NAMES, all datat from ADDRESS if it exists, and the full
> country name from COUNTRY if there is an address.  I tried:
> 
> SELECT        A.NAME, B.ADDRESS, B.CITY, C.COUNTRY_DESCR
> FROM          NAME A
>               LEFT JOIN ADDRESS B ON A.ID = B.ID
>               JOIN COUNTRY C ON B.COUNTRY = C.CODE
> 
> but I got a "resource doesn't exist" type error.
> 
> Is this even possible?  I know left joins can be tricky, but this 
seems like
> it should work.  Maybe I have the syntax wrong?  I even tried using
> parentheses as in:
> 
> SELECT        A.NAME, B.ADDRESS, B.CITY, C.COUNTRY_DESCR
> FROM          NAME A
>               LEFT JOIN ADDRESS B ON (A.ID = B.ID
>               (JOIN COUNTRY C ON B.COUNTRY = C.CODE))
> 
> but that neither worked nor changed the error message.
> 
> Help?
> 
> 
> 



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