update vs4tinventorymb set tinmamouquantity=abs(tinmamouquantity) where tinmquantitycalc>=0 and
(tinmtintalias='STOCKADJUST')
GO

update vs4tinventorymb set tinmamouquantity=-1*abs(tinmamouquantity) where tinmquantitycalc<0 and
(tinmtintalias='STOCKADJUST')
GO

update vs4tinventorymb set tinmamount=abs(tinmamount) where tinmamouquantity>0 and
(tinmtintalias='STOCKADJUST')
GO

update vs4tinventorymb set tinmamount=-1*abs(tinmamount) where tinmamouquantity<0 and
(tinmtintalias='STOCKADJUST')
GO

UPDATE VS4TInventoryMB set tinminquantity=abs(tinmoutquantity) WHERE tinminquantity=0 and  tinmamouquantity>0 and
(tinmtintalias='STOCKADJUST')
GO

UPDATE VS4TInventoryMB set tinmoutquantity=0 WHERE tinminquantity<>0 and tinmoutquantity<>0 and  tinmamouquantity>0 and
(tinmtintalias='STOCKADJUST')
GO

UPDATE VS4TInventoryMB set tinmoutquantity=abs(tinminquantity) WHERE tinmoutquantity=0 and  tinmamouquantity<0 and
(tinmtintalias='STOCKADJUST')
GO

UPDATE VS4TInventoryMB set tinminquantity=0 WHERE tinminquantity<>0 and tinmoutquantity<>0 and  tinmamouquantity<0 and
(tinmtintalias='STOCKADJUST')
GO