UPDATE PHYS_COUNT_TAG
SET COUNT_QTY = (
SELECT qty
FROM MC_PART_LOCATION
WHERE MC_PART_LOCATION.part_id = PHYS_COUNT_TAG.PART_ID
AND MC_PART_LOCATION.location_id = PHYS_COUNT_TAG.LOCATION_ID
)
上面的代码不起作用。执行时出现错误:
Msg 4104, Level 16, State 1, Line 4
The multi-part identifier "PCT.PART_ID" could not be bound.
Msg 4104, Level 16, State 1, Line 5
The multi-part identifier "PCT.LOCATION_ID" could not be bound.