MS ACCESS 指定的字段 [XXXXX} 可以引用 FROM 中列出的多个表 [英] MS ACCESS The specified field [XXXXX} could refer to more than one table listed in the FROM

查看:28
本文介绍了MS ACCESS 指定的字段 [XXXXX} 可以引用 FROM 中列出的多个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在 MS ACCESS 中运行查询时出现以下错误.指定的字段[XXXX}"可以引用 SQL 语句的 FROM 子句中列出的多个表.

I'm getting the following error when trying to run a Query in MS ACCESS. The specified field "[XXXX}" could refer to more than one table listed in the FROM Clause of your SQL Statement.

不确定如何解决 MS Access 中的此错误.我是 MS Access 的新手.

Not sure how to go about this error in MS Access. I'm very new in MS Access.

SELECT Round([Revenue Amount]/[Quantity],2) AS [Rate Paid]
FROM ([Profit Report] RIGHT JOIN ([HBMA 001] INNER JOIN [Key Report] ON [HBMA 001].ID = [Key Report].ID) 
ON ([Profit Report].[S Number] = [Key Report].[S Number]) AND 
([Profit Report].[SL Number] = [Key Report].[SL Number])) 
LEFT JOIN [LTB Analysis] ON [Key Report].[LTB Number] = [HHB LTB Analysis].[LTB Number]

推荐答案

错误描述非常清楚:您肯定有 2 个(或更多)具有相同字段名称的表:[收入金额] 和/或 [数量].只需通过表名前缀字段名来解决这个问题.
例如:

The error description is quite clear: you certainly have 2 (or more) tables with identical field names: [Revenue Amount] and/or [Quantity]. Just fix that by prefixing the field name by the table name.
e.g:

SELECT Round([sometable].[Revenue Amount]/[someOtherTable].[Quantity],2) AS [Rate Paid]   

在设计视图中,只需更改
Round([Revenue Amount]/[Quantity],2) 转化为
Round([sometable].[Revenue Amount]/[someOtherTable].[Quantity],2)
(当然使用正确的表名)

in Design view, just change
Round([Revenue Amount]/[Quantity],2) into
Round([sometable].[Revenue Amount]/[someOtherTable].[Quantity],2)
(using the right table names of course)

这篇关于MS ACCESS 指定的字段 [XXXXX} 可以引用 FROM 中列出的多个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆