关于Update
以下是语句:
Update ShipDateQtyPush
Set ShipDateQtyPush.Sam331=(Select Sam from ProcessQty where ProcessID='331')
where ShipDateQtyPush.PO=ProcessQty.PO
执行的时候老是提示:
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "ProcessQty.PO" could not be bound.
请问该如何修改?
[解决办法]
update a set a.sam331=b.sam from
ShipDateQtyPush a,ProcessQty b
where b.ProcessID='331' and a.po=b.po
[解决办法]
try this,
Update a
Set a.Sam331=b.Sam
from ShipDateQtyPush a
inner join ProcessQty b on a.PO=b.PO and b.ProcessID='331'