2

以下查询在访问中不起作用。

SELECT Fields.FieldId, PrecisionSettings.DecimalPlaces 

    from Fields left outer join FieldGroup on Fields.FieldGroupId = FieldGroup.FieldGroupId

    left outer join Category on FieldGroup.CategoryId = Category.CategoryId

    left outer join PrecisionSettings on 

    Category.InputAttributesID=PrecisionSettings.AttributesID

它给出了查询表达式中缺少运算符的错误。

4

1 回答 1

6

在 Access 中,您一次只能加入两个结果。要加入更多表格,您需要更多括号:

SELECT
    Fields.FieldId,
    PrecisionSettings.DecimalPlaces 
FROM
(
    (
        Fields
        LEFT OUTER JOIN FieldGroup ON Fields.FieldGroupId = FieldGroup.FieldGroupId
    )
    LEFT OUTER JOIN Category ON FieldGroup.CategoryId = Category.CategoryId
)
LEFT OUTER JOIN PrecisionSettings ON Category.InputAttributesID = PrecisionSettings.AttributesID
于 2012-05-11T08:27:22.103 回答