Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying records
Message
From
05/05/1997 10:52:57
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
05/05/1997 10:11:31
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00030828
Message ID:
00030833
Views:
31
>>I have an 'old' table, and a 'new' table (updated structure, new fields, validation rules, etc). I need to copy all of the records from the old table into the new. Most of the field names are the same, and all the new fields are placed at the end. Is there an automatic way to do this, or will I have to write a procedure? The full table has about 75 fields, and +/- 100,000 records. (Yes its normalized, just happens to be a big table). Thanks.
>>
>>Erik
>
>APPEND FROM ... FIELDS ...
>will do this job.
To handle the fields with different names I would...

SELECT *, oldfieldname1 AS newfieldname1, oldfieldname2 AS newfieldname2, oldfieldname3 AS newfieldname3 FROM olddbf INTO CURSOR QUERY

SELE 0
USE newdbf
APPEND FROM QUERY
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform