使用子查询更新 - MS Access [英] Update with subquery - MS Access

查看:96
本文介绍了使用子查询更新 - MS Access的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从子查询中更新名为[Assets]的表中的是/否字段(密封)。


子查询结果包含来自[Assets]的ID和要更新的字段的期望结果,如下:

I am attempting update a Yes/No field (Sealed) in a table called [Assets] from a subquery.

The subquery results contain the ID from [Assets] and the desired result of the field to be updated, as such:

展开 | 选择 | Wrap | 行号

推荐答案

Barmaximus ,

虽然你说你没有成功,但你并没有完全描述那种不成功。是否生成错误?你回复不正确的结果了吗?结果是否正确但更新没有发生?


这些是询问大脑想知道的事情。我们需要了解它们以指导您完成解决方案。
Barmaximus,

Although you state you are not having success, you do not exactly describe that non-success. Is there an error being generated? Are you returning the incorrect results? Are the results correct but the Update is not occurring?

These are the things inquiring minds want to know. And we need to know them in order to guide you through a solution.


Twinnyfo,我为缺乏描述而道歉。我已更新我的帖子以显示我最接近的尝试。似乎更新查询没有使用此方法从子查询中识别IsSealed。
Twinnyfo, I apologize for the lack of description. I have updated my post to show my closest attempt. It seems the update query is not recognizing IsSealed from the subquery with this method.


1。看起来你似乎想要过度复杂化。


2.有一个 LOT 我可以说你的桌子可能不对,但我们可以稍后讨论。


3.让我们走向解决方案:


这样想。如果值为Seal,您只需要将参数更新为 True 。在 BOMTypes MatMovTypes POTypes 中。否则,请更新为错误


为什么不尽早进行一些评估呢?

1. It really seems like you are trying to overly complexify this.

2. There is a LOT that I can say is probably not right about your tables, but we can talk about that later.

3. Let''s move toward a solution:

Think of it this way. You only need to update assests to True if there is a value of "Seal" in BOMTypes, MatMovTypes or POTypes. Otherwise, update to False.

Why not work some of the evaluation at the earliest level?

展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号


这篇关于使用子查询更新 - MS Access的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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