UPDATE VS4TInventoryMB SET TInMTSOBLn=0 ,TInMTMDSLn=0 WHERE (TInMTSOBLn is null or TInMTSOBLn = 0)  AND TInMTInTAlias='SALERETURN'
GO
UPDATE VS4TInventoryMB SET TInMTSODNo=(SELECT TInvRefNo2 FROM VS4Tinventory WHERE VS4Tinventory.TInvno=VS4TinventoryMB.TInMTInvNo) WHERE (TInMTSODNo is null or TInMTSODNo = '') AND TInMTInTAlias='SALERETURN'
GO
UPDATE VS4TInventoryMB SET TInMTSODNo='' WHERE (TInMTSODNo is null) AND TInMTInTAlias='SALERETURN'
GO