Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Seek Command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00645533
Message ID:
00645541
Vues:
11
Here's simplier code that does the same. Try it.
use mytable in 0
use zipcodes in 0 order zip_t
sele mytable
scan
  IF seek(mytable.zip, "zipcode")
     replace mytable.county with zipcode.county
  ENDIF
endscan
What's the expression for the tag zip_t?


>I am trying to use the seek command to do a lookup in a zipcode table. I have two tables
>
>mytable zip c(5) and county c(15)
>zipcodes zip c(5) and county c(15) index tag zip_t
>
>my code looks like this
>
>use mytable in 0
>use zipcodes in 0 order zip_t
>sele mytable
>scan
>hld_cnty = ' '
>scatter memvar
>sele zipcode
>seek(m.zip)
>if found() then
> hld_cnty = zipcode.county
> sele mytable
> replace mytable.county with hld_cnty
>end if
>endscan
>
>However the seek never finds any matching records?????
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform