Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan, store, replace
Message
From
30/07/2006 13:37:20
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
30/07/2006 12:17:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01141620
Message ID:
01141639
Views:
12
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform