In my SELECT statement below, I am having problems
figuring out what I should be putting in place of the
second to last LEFT JOIN join.  It's the one that
reads:

"LEFT JOIN DomesticAddresses AS DomADD" 

I want to LEFT JOIN the columns "DomesticAddresses"
and "DomAdd" to the column
OrganizationID2DomesticAddresses, but the way I have
my SELECT currently written is incorrect apparently. 
How can I fix it, please? I am runninng mysql 3.22.32
on RedHat Linux 7.3

SELECT DISTINCT
Organizations.organizationID AS org_orgID,
Organizations.organizationName AS org_orgName,
OrganizationID2DomesticAddresses.organizationID AS
2domAdd_orgID,
DomesticAddresses.domesticAddressID AS
domAdd_domAddID,
DomesticAddresses.domesticAddressZipCode AS zipCode1,
DomAdd.domesticAddressZipCode AS zipCode2
FROM 
Organizations
LEFT JOIN OrganizationID2DomesticAddresses
ON Organizations.organizationID =
OrganizationID2DomesticAddresses.organizationID
LEFT JOIN DomesticAddresses
ON OrganizationID2DomesticAddresses.domesticAddress1ID
= DomesticAddresses.domesticAddressID
LEFT JOIN DomesticAddresses AS DomAdd
ON OrganizationID2DomesticAddresses.domesticAddress1ID
= DomesticAddresses.domesticAddressID
WHERE Organizations.organizationID = 1
OR Organizations.organizationID = 3;

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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

Reply via email to