UPDATE VS4TAPCreditNoteMB Set TPCMTotalDElivery=TPCMQuantity,TPCMTotalDElivery2=TPCMQuantity2,TPCMTotalDElivery3=TPCMQuantity3 where TPCMTotalDElivery is null and TPCMReturnFlag=1
GO
UPDATE VS4TAPCreditNoteMB Set TPCMTotalDElivery=0,TPCMTotalDElivery2=0,TPCMTotalDElivery3=0 where TPCMTotalDElivery is null and TPCMReturnFlag=0
GO
UPDATE VS4TAPCreditNoteMB Set TPCMTotalArrear=0,TPCMTotalArrear2=0,TPCMTotalArrear3=0 where TPCMTotalArrear is null
GO