Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Very weird update conflict problem
Message
 
À
18/07/2006 18:13:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01137428
Message ID:
01137436
Vues:
19
>SELECT v_zips
>SCAN
> SELECT zips
> LOCATE FOR zips.zipcode == v_zips.zipcode
> IF !EOF()
> SELECT v_zips
> replace v_zips.dealerid WITH zips.dealerid
> ENDIF
>
>ENDSCAN

Greg,

Is v_zips indexed by the dealerid when you are replacing it?
Also is zips indexed by the zipcode? Then you can consider next:
SELECT v_zips
set order to 0 && Zero
SCAN
  IF INDEXSEEK(v_zips.zipcode,.F.,"zips","zipcode")  
    replace v_zips.dealerid WITH zips.dealerid IN v_zips
  ENDIF
ENDSCAN
OR you can even use next code
 replace v_zips.dealerid WITH zips.dealerid ;
   FOR v_zips.zipcode == zips.zipcode IN v_zips
...and of course you can add other "FOR" filters if needed as
 replace v_zips.dealerid WITH zips.dealerid ;
   FOR v_zips.zipcode == zips.zipcode AND ;
    !EMPTY(v_zips.zipcode) IN v_zips && et cetera
AT
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform