Is there an efficient way to copy lots of data from a table to another one? [message #140927] |
Thu, 06 October 2005 04:46 |
george.wei
Messages: 4 Registered: October 2005
|
Junior Member |
|
|
Dear all,
I have to synchronize data in two tables, the rule is:
1.Clear data in table B first
2.All records in table A must be appended into table B
3.If a field in table A does not exist in table B, it is ignored
The current solution is:
1.Find which fields exist in both table
2.Generate an INSERT statement for each record, write these statements into a script file
3.Insert a COMMIT statement into the script for each 100 records. Use this statement to make the transaction small
4.Run the script
But this solution is inefficient. Is there a better way to perform this job? Thanks for any clues.
Regards,
George
|
|
|
|
|
|