Information générale
Catégorie:
Codage, syntaxe et commandes
>John,
>
>You could write a pretty simple procedure that would use SCATTER/GATHER to take care of all the general fields. Then use AFIELDS() to find any general fields and REPLACE those using macro substitution.
>
>
>>I have written generic code for archiving data from a live database to an archive database using views and the Scatter/Gather commands. I recently added a table that contains a General Field. As the VFP documentation states, Scatter and Gather do not work with General Fields.
>>
>>Does anybody have a slick approach or method for copying records from one table to another table (with duplicate structures) when the table has a General Field in it?
>>
>>Thanks for any help you might be able to give!
>>
>>John
Simplest way is COPY FILE x.dbf to y.dbf ;
COPY FILE x.fpt to y.fpt
This does not give the ability to filter out undesirable records, so you might try:
Use DBF1
Copy stucture to DBF2
Use DBF2
Append from DBF1 FOR xxxx...
Hope this helps
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement