update VS4TTeasuryTransMB set tttmnote=(select ttetrefno from VS4TTeasuryTrans where tttmttetno=ttetno)
update VS4TTeasuryTransMB set tttmtypelist=(select ttetsavefrom from VS4TTeasuryTrans where tttmttetno=ttetno)
Update VS4TTeasuryTransMB set TTTMValidDate =(select tpvpcashdate from VS4TAPVoucherPay Where TPVPTAPVNo=tttmnote and tttmln=tpvpln) where tttmnote<>'' and tttmtypelist='PV'
Update VS4TTeasuryTransMB set TTTMValidDate =(select tRVRcashdate from VS4TRVReceive Where TRVRTRVHNo=tttmnote and tttmln=trvrln) where tttmnote<>'' and tttmtypelist='RV'
Update VS4TTeasuryTransMB set TTTMValidDate =(select tpipcashdate from VS4TAPInvoicePay Where TpipTiapNo=tttmnote and tttmln=tpipln) where tttmnote<>'' and tttmtypelist='PIV'
Update VS4TTeasuryTransMB set TTTMValidDate =(select tipycashdate from VS4TInvoicePayment Where TipyTivoNo=tttmnote and tttmln=tipyln) where tttmnote<>'' and tttmtypelist='IV'
