UPDATE VS4TTeasuryTransMB Set TTTMType = (SELECT TTeTType From VS4TTeasuryTrans WHERE VS4TTeasuryTransMB.TTTMTTeTNo=VS4TTeasuryTrans.TTeTNo)
GO
UPDATE VS4TTeasuryTransMB Set TTTMType = 6 WHERE TTTMType is null
GO
UPDATE VS4TTeasuryTransMB Set TTTMMoneyRate = 1 WHERE TTTMMoneyRate is null or TTTMMoneyRate = 0
GO
UPDATE VS4TTeasuryTransMB Set TTTMMoney=TTTMMoneyAmount/TTTMMoneyRate where TTTMType=1
GO
