UPDATE Vs4TAR Set TARNFlag2=1
GO
UPDATE Vs4TAR Set TARNFlag2=0 WHERE TARNTCouCode='TH'
GO
UPDATE Vs4TAR Set TARNFlag2=1 WHERE TARNFlag2 is NULL
GO

UPDATE Vs4TAR2 Set TAR2Flag2=(Select TARNFlag2 FROM VS4TAR WHERE VS4TAR2.TAR2TARNCode=VS4TAR.TARNCode)
GO
UPDATE Vs4TAR2 Set TAR2Flag2=0 WHERE TAR2Flag2 is NULL
GO
UPDATE Vs4TAR2 Set TAR2VATRate=0 WHERE TAR2Flag2=1
GO
UPDATE Vs4TAR2 Set TAR2VATRate=7 WHERE TAR2Flag2=0
GO
UPDATE Vs4TAR2 Set TAR2VATType=1 WHERE TAR2Flag2=1 AND TAR2VATType is NULL
GO
UPDATE Vs4TAR2 Set TAR2VATType=1 WHERE TAR2Flag2=0 AND TAR2VATType is NULL
GO