我有两个表 MANUAL_TRANSACTIONS 和 MANUAL_LIST_TEMP。我想要实现的是使用来自 MANUAL_LIST_TEMP 的信息更新 MANUAL_TRANSACTIONS。这里只有存在于 MANUAL_LIST_TEMP 表中的记录应该更新为 MANUAL_TRANSACTIONS。
我已经做了类似下面的事情,但以下语句的问题是它更新了 MANUAL_TRANSACTIONS 表中的每条记录。
UPDATE MANUAL_TRANSACTIONS
SET ( "Age", "Assigned_To", "Attachments", "Comments", "Completed_Date_Time"
, "Content_Type", "Created", "Created_By","Cycle_Time (Crt to Complete)"
, "Cycle_Time (First reply)", "DISTRIBUTION_CHANNEL")=
(SELECT MANUAL_LIST_TEMP."Age", MANUAL_LIST_TEMP."Assigned_To",
MANUAL_LIST_TEMP."Attachments", MANUAL_LIST_TEMP."Comments",
MANUAL_LIST_TEMP."Completed_Date_Time", MANUAL_LIST_TEMP."Content_Type",
MANUAL_LIST_TEMP."Created", MANUAL_LIST_TEMP."Created_By",
MANUAL_LIST_TEMP."Cycle_Time (Crt to Complete)",
MANUAL_LIST_TEMP."Cycle_Time (First reply)",
MANUAL_LIST_TEMP."Distribution_Channel"
FROM MANUAL_LIST_TEMP
WHERE MANUAL_LIST_TEMP.ID = MANUAL_TRANSACTIONS.ID)