>>I am using scan to find records in table1 and replace then in table2
>>Do I really have store to variables as i am doing below or is there other way ?
>>
>>*****************
>> select table1
>> scan for paid = .t.
>> store table1.cod to cod1
>> store table1.client to cl1
>>select table2
>> replace table2.code with cod1
>> replace table2.name with cl1
>>
>>endscan
>>************
>>
>>Table2 fields names are different from table1
>>Thanks
>>
>>Moises
>
>No, you can access the other table directly, like this:
>
>
>select table1
>scan for paid
> select table2
> * (seek or replace is missing here?)
> replace;
> code with Table1.cod1,;
> name with Table1.cl1
>endscan
>
BTW It's safer to add the IN clause to replace commands.