SELECT TABLE_A SCAN FOR Amount<>0 STORE Number TO xNbr SELECT TABLE_B LOCATE FOR Field1B=xNbr * To be safe you should check here if the record is found or not REPLACE Field2B WITH TABLE_A.Amount ENDSCANIf you have an index on Field1B in TABLE_B than even shorter
SET ORDER TO Field1B IN TABLE_B SELECT TABLE_A SET RELATION TO Number INTO TABLE_B SCAN FOR Amount<>0 IF FOUND("TABLE_B") SELECT TABLE_B REPLACE Field2B WITH TABLE_A.Amount SELECT TABLE_A ENDIF ENDSCAN>Hi all:
>SELECT TABLE-A > GO TOP > LOCATE FOR Amt<>0 > DO WHILE NOT EOF() > STORE Amount TO xAmt > STORE Number TO xNbr > SELECT TABLE-B > LOCATE FOR Field1B=xNbr > REPLACE Field2B WITH xAmt > SELECT TABLE-A > CONTINUE && At this point, CONTINUE moves to the first record in TABLE-A > IF EOF() > EXIT > ENDIF > ENDDO >>According to HELP, CONTINUE should resume the search starting at the current record, once TABLE-A is reselected, but instead, it goes to Record 1.