UPDATE VS4TARCreditNoteMB Set TRCMTotalDElivery=TRCMQuantity,TRCMTotalDElivery2=TRCMQuantity2,TRCMTotalDElivery3=TRCMQuantity3 where TRCMTotalDElivery is null and TRCMReturnFlag=1
GO
UPDATE VS4TARCreditNoteMB Set TRCMTotalDElivery=0,TRCMTotalDElivery2=0,TRCMTotalDElivery3=0 where TRCMTotalDElivery is null and TRCMReturnFlag=0
GO
UPDATE VS4TARCreditNoteMB Set TRCMTotalArrear=0,TRCMTotalArrear2=0,TRCMTotalArrear3=0 where TRCMTotalArrear is null
GO