INSERTROWEXISTS with the USEMAX Resolution
For this example, the USEMAX
resolution is illustrated with the applicable before and after images for the record in the trail and in the database. It shows how to resolve an insert where the row exists in the source and target, but some or all row values are different.
Table 9-9 INSERTROWEXISTS Conflict with USEMAX Resolution
Image | SQL | Comments |
---|---|---|
Before image in trail |
None (row was inserted on the source). |
N/A |
After image in trail |
name='Mary' phone='1234567890' address='Oracle Pkwy' salary=100 balance=100 comment=NULL last_mod_time='9/1/10 3:00' |
|
Target database image |
name='Mary' phone='111111' address='Ralston' salary=200 balance=500 comment='aaa' last_mod_time='9/1/10 1:00' |
|
Initial |
SQL bind variables: 1)'Mary' 2)'1234567890' 3)'Oracle Pkwy' 4)100 5)100 6)NULL 7)'9/1/10 3:00' |
This SQL returns a uniqueness conflict on 'Mary'. |
|
SQL bind variables: 1)'1234567890' 2)'Oracle Pkwy' 3)100 4)100 5)NULL 6)'9/1/10 3:00' 7)'Mary' 8)'9/1/10 3:00' |
Because |