Hi,

I am hoping you can help me please. 

The following query, while valid, returns me an Empty set. 
--------------------------------------------------------------------------------
------------------
SELECT plan, cardNr, crdholdersName, cardType, cardExpDate, 
strAddr, townCity, stateProvince, postCode, country 
FROM users u LEFT JOIN persons p ON p.personID = u.personID,  addr a 
INNER JOIN intOrgPerAddr iPA ON a.addrID = iPA.addrID AND u.personID =
iPA.personID AND u.userID= 1 
WHERE addrType = 'CCD';
--------------------------------------------------------------------------------
-----------------

Which is understandable, as the only field guaranteed to have anything in it is
'plan'. And with my (limited) knowledge, I'm guessing it's the INNER JOIN which
is causing the empty set return. However, I WANT to have 'plan' returned
irrespective. 

Obviously, I can split it and run with 2 separate queries, but I think it would
be nice to pull it all back in one round-trip. Only problem with that is, I
don't know how to formulate it so as to get around the INNER JOIN spec. to
effectively make it a LEFT JOIN. 

Can you help pls?

MTiA

[Filter: SQL, MySQL]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to