UPDATE VS4TPOMB SET TPOBUnitFactor=(SELECT TPDURatio FROM VS4TPRODUCTUNIT Where TPDUTPdtcode=TPOBTPdtCode AND TPDUTUNTCODE=TPOBTUNTCode)
GO
UPDATE VS4TPOMB  SET TPOBUnitFactor=1 where TPOBUnitFactor=0 or TPOBUnitFactor is null
GO
UPDATE VS4TPODelivery SET TPDEMapUnitRatio=(SELECT TPDURatio FROM VS4TPRODUCTUNIT Where TPDUTPdtcode=TPDEMapTPdtCode AND TPDUTUNTCODE=TPDEMapTUntCode)
GO
UPDATE VS4TPODelivery SET TPDEMapUnitRatio=1 where TPDEMapUnitRatio=0 or TPDEMapUnitRatio is null
GO
