Select Subledger Go Top Scan While .Not. Eof() If Left(Vrno,2)=="J-" Alldata_Vrno=Vrno Select Journal Locate For Vrno==Alldata_Vrno If Found()=.T. SumNaration=Naration1+Naration2+Naration3+Naration4+Naration5 Endif Select Subledger Replace Details With SumNaration Endif ENDSCANRegards
>> >>******UPDATE SUBLEDGER DETAILS******* >>Goto Top >>Scan While .Not. Eof() >>T_Newcode=Left(Accode,3)+"0000" >> >>Select Schedule >>Locate For newcode=T_Newcode >>If Found()=.T. >>T_desc=Desc >>Else >>T_desc="Account Code Missing" >>Endif >>Select Subledger >>Replace Schedule With T_desc >>Endscan >> >>>>
>UPDATE SubLedger SET Schedule = NVL(Sch.DESC, "Account Code Missing") >FROM SubLedger LEFT JOIN Schedule Sch ON Sch.NewCode = LEFT(SubLedger.AcCode,3) + '0000'