UPDATEROWEXISTS 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 update where the row exists in the source and target, but some or all row values are different.
Table 9-10 UPDATEROWEXISTS Conflict with USEMAX Resolution
Image | SQL | Comments |
---|---|---|
Before image in trail |
name='Mary' phone='1234567890' address='Oracle Pkwy' salary=100 balance=100 comment=NULL last_mod_time='9/1/10 3:00' |
|
After image in trail |
phone='222222' address='Holly' last_mod_time='9/1/10 5:00' |
|
Target database image |
name='Mary' phone='1234567890' address='Oracle Pkwy' salary=100 balance=600 comment='com' last_mod_time='9/1/10 6:00' |
|
Initial |
SQL bind variables: 1)'222222' 2)'Holly' 3)'9/1/10 5:00' 4)'Mary' 5)'1234567890' 6)'Oracle Pkwy' 7)100 8)100 9)NULL 10)'9/1/10 3:00' |
This SQL returns a no-data-found error because the values for the All columns are used in the |
|
SQL bind variables: 1)'Mary' 2)'222222' 3)'Holly' 4)100 5)100 6)NULL 7)'9/1/10 5:00' 8)'Mary' 9)'9/1/10 5:00' |
Because the after value of |