The following table provides an overview of the results of copying data records from a source company to a target company, using each of the following copy methods:
Add New Records and Update Existing Records
Adds new records and updates records with matching keys.
Add New Records Without Updating Existing Records
Does not update records with matching keys but adds new records.
Update Existing Records Without Adding New Records
Updates records with matching keys without adding new records.
Delete All Records Then Add New Records
Erases all existing records in the target database and adds new records.
Copy Method |
Copy from Table 1 (T1) to Table 2 (T2) |
||||||||
---|---|---|---|---|---|---|---|---|---|
Add New Records and Update Existing Records |
Before Copy |
After Copy |
|||||||
T1 |
T2 |
T1 |
T2 |
||||||
Business Key |
Content |
Business Key |
Content |
Business Key |
Content |
Business Key |
Content |
||
1 |
A |
1 |
C |
1 |
A |
1 |
A |
||
2 |
B |
2 |
F |
2 |
B |
2 |
B |
||
3 |
C |
3 |
E |
3 |
C |
3 |
C |
||
4 |
D |
4 |
D |
4 |
D |
||||
Add New Records Without Updating Existing Records |
Before Copy |
After Copy |
|||||||
T1 |
T2 |
T1 |
T2 |
||||||
Business Key |
Content |
Business Key |
Content |
Business Key |
Content |
Business Key |
Content |
||
1 |
A |
1 |
A |
1 |
A |
1 |
A |
||
2 |
B |
2 |
F |
2 |
B |
2 |
F |
||
3 |
C |
3 |
C |
3 |
C |
3 |
C |
||
4 |
D |
4 |
D |
4 |
D |
||||
Update Existing Records Without Adding New Records |
Before Copy |
After Copy |
|||||||
T1 |
T2 |
T1 |
T2 |
||||||
Business Key |
Content |
Business Key |
Content |
Business Key |
Content |
Business Key |
Content |
||
1 |
A |
1 |
A |
1 |
A |
1 |
A |
||
2 |
B |
2 |
F |
2 |
B |
2 |
B |
||
3 |
C |
3 |
C |
3 |
C |
3 |
C |
||
4 |
D |
4 |
D |
||||||
Delete All Records Then Add New Records |
Before Copy |
After Copy |
|||||||
T1 |
T2 |
T1 |
T2 |
||||||
Business Key |
Content |
Business Key |
Content |
Business Key |
Content |
Business Key |
Content |
||
1 |
A |
1 |
A |
1 |
A |
1 |
A |
||
2 |
B |
2 |
F |
2 |
B |
2 |
B |
||
3 |
C |
3 |
C |
3 |
C |
3 |
C |
||
4 |
D |
4 |
D |
4 |
D |
||||
Caution
When copying data using the Update Existing Records Without Adding New Records copy method, you may encounter errors when copying objects that are dependent on other objects that exist in the source but not in the target.
For example, suppose both the source and target companies contain a distribution rule, DR01, with the following dependencies:
In the source, DR01 is dependent on the cost centers C001 and C002.
In the target, DR01 is dependent on the cost centers C003 and C004.
You want to copy DR01, C001, and C002 from the source to the target. However, because both C001 and C002 do not already exist in the target, and the selected copy method does not add new records, C001 and C002 are not copied. Since the distribution rule DR01 is dependent on C001 and C002, which do not exist in the target, the application encounters an error and fails to update the record for DR01.