UPDATE VS4TPO SET TPODClientTaxNo=(SELECT TAPNTaxNo FROM Vs4TAP WHERE TPODTAPNCode=TAPNCode)
WHERE TPODClientTaxNo='' or TPODClientTaxNo is null
GO

UPDATE VS4TPS SET TPSDClientTaxNo=(SELECT TAPNTaxNo FROM Vs4TAP WHERE TPSDTAPNCode=TAPNCode)
WHERE TPSDClientTaxNo='' or TPSDClientTaxNo is null
GO

UPDATE VS4TAPInvoice SET TIAPClientTaxNo=(SELECT TAPNTaxNo FROM Vs4TAP WHERE TIAPTAPNCode=TAPNCode)
WHERE TIAPClientTaxNo='' or TIAPClientTaxNo is null
GO
