当我尝试在 MS-Access 2010 中运行以下查询时,我在 FROM 子句对话框中收到语法错误:
SELECT
Contact_addresses.AddressID,
Contact_addresses.ContactID,
Contact_addresses.Address1,
Contact_addresses.Address2,
Contact_addresses.City,
Contact_addresses.State,
Contact_addresses.Zip,
Owner_Operator.FIRM_NAME,
Official_Correspondent.FIRST_NAME,
Official_Correspondent.LAST_NAME,
Official_Correspondent.SUBACCOUNT_COMPANY_NAME,
Official_Correspondent.PHONE_NUMBER
FROM Contact_addresses
(
LEFT JOIN
(SELECT
Owner_Operator.CONTACT_ID,
Owner_Operator.FIRM_NAME
FROM Owner_Operator)
ON Contact_addresses.ContactID=Owner_Operator.CONTACT_ID
)
LEFT JOIN
(SELECT
Official_Correspondent.CONTACT_ID,
Official_Correspondent.FIRST_NAME,
Official_Correspondent.LAST_NAME,
Official_Correspondent.SUBACCOUNT_COMPANY_NAME,
Official_Correspondent.PHONE_NUMBER
FROM Official_Correspondent)
ON Contact_addresses.ContactID=Official_Correspondent.CONTACT_ID
;
当我关闭对话框时,访问会突出显示(在 FROM Contact_addresses.
我知道我需要在 Access 中使用多个嵌套连接的括号,但是除了显示如何解决问题之外,有人可以解释一下它是如何工作的概念吗?
从 SQL SELECT 语句中应该清楚底层表架构的相关方面。