UPDATE VS4TTeasuryTrans SET TTeTRefNo2=TTeTNo where TTeTRefNo2='' OR TTeTRefNo2 is null
GO
UPDATE VS4TTeasuryTransMB SET TTTMRefNo2=TTTMTTeTNo where TTTMRefNo2='' OR TTTMRefNo2 is null
GO
UPDATE VS4TTeasuryTransMB SET TTTMRefNo=(SELECT TTeTRefNo FROM VS4TTeasuryTrans where VS4TTeasuryTransMB.TTTMTTeTNo=VS4TTeasuryTrans.TTeTNo)
GO
