In the following example, the customer
table is opened, its structure is copied to a table called backup,
and backup
is then opened. Visual FoxPro then appends all records from Finland from the customer
table. These records are then copied to a new delimited file called TEMP.TXT
.
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE customer && Open customer table
COPY STRUCTURE TO backup
USE backup
APPEND FROM customer FOR country = 'Finland'
COPY TO temp TYPE DELIMITED
MODIFY FILE temp.txt
USE
DELETE FILE backup.dbf
DELETE FILE temp.txt