以下是基于类似问题我尝试过的内容:
UPDATE Workforce
SET Workforce.Deactivated = Yes
FROM Workforce LEFT JOIN WorkersLast30Days
ON Workforce.[WorkforceID] = WorkersLast30Days.[WorkerID]
WHERE (((WorkersLast30Days.WorkerID) Is Null));
使用MS Access。
Workforce是一个表,Deactivated是其中的一列(是/否) WorkersLast30Days是另一个查询,提供了我不想更新的ID。
答案 0 :(得分:0)
在MS Access中,尝试以下操作:
UPDATE Workforce
SET Workforce.Deactivated = 'Yes'
WHERE NOT EXISTS (SELECT 1
FROM WorkersLast30Days
WHERE Workforce.[WorkforceID] = WorkersLast30Days.[WorkerID]
);