Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace
Message
From
28/03/2005 03:22:57
 
 
To
24/03/2005 08:53:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00998811
Message ID:
00999373
Views:
19
hi,
thanks for reply,
i try to run the code ,but no result at myfield team.
i try via this code under it works but it take long long time ,
maybe this code under can explane what i need to do.
thanks
 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
>
>
>>i have 2 tables, first 1 (neg1) have 30021 records, another (neg) have 2630
>>i need to replace neg.team with neg1.team where neg.tel=neg1.tel
>>i try via this code under, but not work
>      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
Previous
Reply
Map
View

Click here to load this message in the networking platform