Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Seek Command
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00645533
Message ID:
00645541
Views:
10
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform