使用内部联接删除查询时出错 [英] Error from Delete query with inner join

查看:79
本文介绍了使用内部联接删除查询时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我试图运行的查询:


DELETE DISTINCTROW设备。*

来自CHSRRequestInProgressB INNER JOIN设备ON CHSRRequestInProgressB.JTag =设备。[EquipJ-tag#];


我收到一条错误,指出无法从指定的表中删除。我需要删除的行的表在Equipment表中。 [EquipJ-tag#]是此表中的主键。我可以在设备表本身内进行编辑,因此该表不是只读的。我可以在数据表视图中运行查询,信息是正确的,但我无法更新信息。


请协助。


Rick

Below is the query that I am attempting to run:

DELETE DISTINCTROW Equipment.*
FROM CHSRRequestInProgressB INNER JOIN Equipment ON CHSRRequestInProgressB.JTag = Equipment.[EquipJ-tag#];

I receive an error stating "Could not delete from specified tables". The table I need the rows deleted from are in the Equipment table. The "[EquipJ-tag#]" is the primary key in this table. I can edit from within the equipment table itself, so the table is not read only. I can run the query in datasheet view and the information is correct, but I can not update the information.

Please assist.

Rick

推荐答案

为什么DISTINCTROW在那里?
Why is DISTINCTROW in there?


根据以上所述,如果表CHSRRequestInProgressB被删除,则能够更改或删除记录是可能的。将此查询添加为内部联接时,查询将变为只读。 CHSRRequestInProgressB查询中的JTAG是文本字段+表中的数据字段+表中的数据字段的组合。以下是创建jtag的确切信息:


JTag:" CHSR" &安培; [EquipmentRequested]。[CHSR]& " - " &安培; [EquipmentRequested]。[InitiatedDate]


我不明白为什么当我只想从Equipment表中删除时CHSRRequestInProgressB会产生任何影响。


我希望这有助于得到答案。
Per the above, If the table CHSRRequestInProgressB is removed, the ability to change or delete records is possible. When this query is added as an Inner Join, the query becomes read only. The JTAG in the CHSRRequestInProgressB query is a combination of a text field + a data field from table + a data field from table. Below is the exact information for creating the jtag:

JTag: "CHSR" & [EquipmentRequested].[CHSR] & "-" & [EquipmentRequested].[InitiatedDate]

I do not understand why the CHSRRequestInProgressB would have any impact when I only want to delete from the Equipment table.

I hope this helps in getting the answer.


我尝试过DISTINCTROW而没有它。它给出了相同的错误消息。
I have attempted with the DISTINCTROW and without it. It gives the same error message.


这篇关于使用内部联接删除查询时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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