update vs4tpoptrans set tppdsupaddress=(select tapnaddressbill from vs4tap where vs4tap.tapncode=vs4tpoptrans.tppdtapncode)
where (tppdtype<>2 and tppdtype<>3 and tppdtype<>5 and tppdtype<>7)
and (tppdsupaddress='' or tppdsupaddress='-' or tppdsupaddress is null)
GO
update vs4tpoptrans set tppdsupaddress=(select tarnaddressbill from vs4tar where vs4tar.tarncode=vs4tpoptrans.tppdtapncode)
where (tppdtype=2 or tppdtype=3 or tppdtype=5 or tppdtype=7)
and (tppdsupaddress='' or tppdsupaddress='-' or tppdsupaddress is null)
GO