Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Very weird update conflict problem
Message
 
 
To
18/07/2006 18:13:29
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01137428
Message ID:
01137436
Views:
18
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform