--FIX OLD TRANSFER REFNO ERROR
UPDATE VS4TInventory set tinvrefno=(select ttfrrefno from vs4ttransfer where tinvno=ttfrno)
where (tinvtintalias='BORROW' OR tinvtintalias='BORROWBACK' or tinvtintalias='BUILT' or
tinvtintalias='BUILTOUT' or  tinvtintalias='CHANGESTATUS' or tinvtintalias='RECEIVEBORROW' or
tinvtintalias='RECEIVEFGBUILT' or tinvtintalias='RECEIVEFGBUILTOUT' or 
tinvtintalias='RECEIVESCRAPBUILT' or tinvtintalias='RECEIVESCRAPBUILTOUT' or tinvtintalias='RECEIVEWIPBUILT' or
tinvtintalias='RECEIVEWIPBUILTOUT' or tinvtintalias='RETURNBUILT' or tinvtintalias='RETURNBUILTOUT' or
tinvtintalias='SENDCONSIGN' or tinvtintalias='SENDCONSIGNRETURN' or tinvtintalias='TRANSFER')

