update vs4tinventorymb set tinmtmdsln=1,tinmtsobln=tinmln where (tinmtsobln is null or tinmtsobln =0) and tinmtintalias='SALEOUTPOS'
GO
update vs4tinventorymb set tinmtSODNo=(SELECT vs4tinventory.Tinvrefno from vs4tinventory where vs4tinventory.tinvno=vs4tinventorymb.tinmtinvno) where (tinmtSODNo is null or tinmtSODNo='') and tinmtintalias='SALEOUTPOS'
GO
