if secode.dbf is indexed on secode...
local lcWasAlias, lcOrder
lcWasAlias = alias()
lcOrder = order('secode')
select secode
set order to secode
select country
set relation to secode into secode
replace all sename with secode.sename for found('secode')
select secode
if not empty(lcOrder)
set order to (lcOrder)
endif
if not empty(lcWasAlias)
select (lcWasAlias)
endif
This is but one way of many
Glenn
>Respected experts ,
>
>I have two tables. one country.dbf belongs to country.dbc database and second secode.dbf. In secode.dbf there are two field 'secode' and 'sename'. In country.dbf I have fifteen fields including 'secode' and 'sename'. Now I have to update or replace 'sename' in country.dbf with 'sename' in secode.dbf. In this two tables 'secode' is the same or unique , means I have to compare this two tables by 'secode'.
>
>so how can i do this by programmatically.
>
>thanks.