SELECT 1 use neg1 INDEX ON tel1 TO kk m.tel1=tel1 m.team=team scan SELECT 2 USE neg LOCATE FOR tel1=m.tel1 AND TRIM(team)> SPACE(10) replace team WITH m.team FOR tel1=m.tel1 SELECT 1 m.tel1=tel1 m.team=team IF EOF() EXIT ENDIF endscan>What exactly is not working? Try this simplified code:
USE Neg IN 0 >USE Neg1 IN 0 >SELECT Neg1 > >SCAN > SELECT Neg > REPLACE Team WITH Neg1.Team FOR ALLTRIM (Neg.Tel) == ALLTRIM (Neg1.Tel) >ENDSCAN >>
> select 1 >> use neg1 >>do whil .t. .and. !eof() >>scatter memvar >> m.tel=tel >> m.team=team >> select 2 >> use neg >> replace team WITH m.team FOR tel=m.tel >> brow >> select 1 >> skip >> if eof() >> exit >> endif >>enddo >>CLOSE ALL