使用内部联接删除查询时出错

编程入门 行业动态 更新时间:2024-10-27 16:31:00
本文介绍了使用内部联接删除查询时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

以下是我试图运行的查询: 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.

更多推荐

使用内部联接删除查询时出错

本文发布于:2023-10-15 00:42:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1492727.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!