update vs4tpodelivery set tpdemaptpdtcode=tpdeproductcode where tpdemaptpdtcode='' or tpdemaptpdtcode is null
GO
update vs4tpodelivery set tpdemaptuntcode=tpdeunitcode where tpdemaptuntcode='' or tpdemaptuntcode is null
GO
update vs4tpodelivery set tpdemapunitratio=(Select tpobmapratiop from vs4tpomb where vs4tpomb.tpobtpodno=vs4tpodelivery.tpdetpobtpodno and vs4tpomb.tpobln=vs4tpodelivery.tpdetpobln) where tpdemapunitratio=0 or tpdemapunitratio is null
GO