首先我看了類似的問題,但沒有找到我的情況。 我會變得SQL訪問代碼如下(我沒有寫它)多部分標識符不能綁定在更新查詢中
UPDATE QUpdateTrialstepApproved1
INNER JOIN TrialStepApproved ON
QUpdateTrialstepApproved1.cid_req = TrialStepApproved.cID
SET TrialStepApproved.wm21 = [wm2_req],
TrialStepApproved.sw = [startweek_req],
TrialStepApproved.PlannedTotalm2 = [m2_req],
TrialStepApproved.ew = [endweek_req],
TrialStepApproved.ActualNrofDiffEntries = [entries_req],
TrialStepApproved.entryfactorTrial1 = [eFtrial_req],
TrialStepApproved.fixeddeliveryweek = [fixedEndweek_req],
TrialStepApproved.culturename = [culturename_req]
WHERE (((QUpdateTrialstepApproved1.approveRequestChange)="v")
AND ((TrialStepApproved.Location) Is Not Null));
我已經把它變成下面,但我得到的錯誤標題:
UPDATE A
SET B.wm21 = [wm2_req],
B.sw = [startweek_req],
B.PlannedTotalm2 = [m2_req],
B.ew = [endweek_req],
B.ActualNrofDiffEntries = [entries_req],
B.entryfactorTrial1 = [eFtrial_req],
B.fixeddeliveryweek = [fixedEndweek_req],
B.culturename = [culturename_req]
from QUpdateTrialstepApproved1 as A
INNER JOIN TrialStepApproved as B ON A.cid_req = B.cID
WHERE A.approveRequestChange='v' AND B.Location Is Not Null
你可以; t更新A,然後讓查詢的設置部分使用=左側的另一個表。嘗試交換左右。 – HLGEM
準確地說,我認爲,但我的困惑,它在訪問:) 你是什麼意思交換左和右? – AngelicCore
您正在更新表格A但設置了表格B字段?您還使用了哪些DBMS? –