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--