I would like to return rows, with specific columns, for each individual in
my NAMES table, with address and e-mail if these exist. Thought I had the
syntax down but I'm getting NULL results where I know there is data. I'm
used to using SQL Server shortcut * for outer joins, guess that's catching
up with me now :(
I would have thought the syntax would be:
SELECT A.LAST_NAME, A.FIRST_NAME, B.CITY, B.STATE, C.EMAIL
FROM NAMES_TBL A
LEFT JOIN ADDRESS_TBL B ON A.DBID = B.DBID
LEFT JOIN EMAIL_TBL C ON A.DBID = C.DBID
WHERE A.LAST_NAME = 'Smith'
Am I doing it wrong?
chris
---------------------------------------------------------------------
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