UPDATE VS4TTaxTrans SET TTxTLawType=7,TTxTLawType2=0 WHERE (isnull(TTxTBaseAmount5,0)<>0) AND (isnull(TTxTBaseAmount6,0)<>0) AND TTxTLawType is null AND TTxTLawType2 is null
GO

UPDATE VS4TTaxTrans SET TTxTLawType=0 WHERE isnull(TTxTBaseAmount6,0)<>0 AND TTxTLawType is null
GO
UPDATE VS4TTaxTrans SET TTxTLawType=1 WHERE isnull(TTxTBaseAmount1,0)<>0 AND TTxTLawType is null
GO
UPDATE VS4TTaxTrans SET TTxTLawType=2 WHERE isnull(TTxTBaseAmount2,0)<>0 AND TTxTLawType is null
GO
UPDATE VS4TTaxTrans SET TTxTLawType=3 WHERE isnull(TTxTBaseAmount3,0)<>0 AND TTxTLawType is null
GO
UPDATE VS4TTaxTrans SET TTxTLawType=4 WHERE isnull(TTxTBaseAmount4A ,0)<>0 AND TTxTLawType is null
GO
UPDATE VS4TTaxTrans SET TTxTLawType=5 WHERE isnull(TTxTBaseAmount4B,0)<>0 AND TTxTLawType is null
GO
UPDATE VS4TTaxTrans SET TTxTLawType=6 WHERE isnull(TTxTBaseAmount4B2,0)<>0 AND TTxTLawType is null
GO
UPDATE VS4TTaxTrans SET TTxTLawType=7 WHERE isnull(TTxTBaseAmount5,0)<>0 AND TTxTLawType is null
GO