Update还可以这样用

update PU_T_VMIUsedVouchs set bcosting =(case when isnull(iconfirmquantity,0)=0 then 0 else bincost end) 
from warehouse 
where warehouse.cwhcode=PU_T_VMIUsedVouchs.cwhcode and PU_T_VMIUsedVouchs.id=N'1000000066'
go

你可能感兴趣的:(Update还可以这样用)