Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying records from one table to another in FPW 2.6
Message
From
21/03/1997 16:24:53
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
19/03/1997 13:38:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00024865
Message ID:
00025241
Views:
25
>I have a routine that copies records from one table to another. Sounds simple, but when APPEND is used, the size of the tables exceeds the available memory and cause a Stack Fault.
>
>I rewrote it so that the records write over existing records (based on matching criteria) using SCATTER MEMVAR and GATHER MEMVAR and use a INSERT - SQL if more records are needed. The problem is that this takes a long time. I can watch the records being written over. The matching criteria is by State and if I have a lot of states to copy, it is painful. (Even one state is painful.)
>
>Anyone have any better ideas?
>
>Sarah

Your message seems to indicate that you have to update existing records in one table with corresponding records in the other table. Do you also add new records to the existing table from the other table?. I'm not sure what you mean by the size of the table causing a stack fault. I've built a nice piece of code to compare the "other" table to the existing table. Its done with 2 SQLs. The first SQL looks for existing records that have some difference. The second SQL looks for new records. The source table is 90,000 records and the existing (target) table is over 1 Million.

The entire process is very very fast. If this sounds like what you need send me an email and I'll post a sample.
Previous
Reply
Map
View

Click here to load this message in the networking platform