Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace
Message
De
28/03/2005 03:22:57
 
 
À
24/03/2005 08:53:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Divers
Thread ID:
00998811
Message ID:
00999373
Vues:
17
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform