Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan, store, replace
Message
De
30/07/2006 13:37:20
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
30/07/2006 12:17:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01141620
Message ID:
01141639
Vues:
23
>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform