DELETEROWMISSING with DISCARD Resolution

For this example, the DISCARD 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 the case where the target row is missing. In the case of a delete on the source, it is acceptable for the target row not to exist (it would need to be deleted anyway), so the resolution is to discard the DELETE operation that is in the trail.

Table 10-5 DELETEROWMSING Conflict with DISCARD Resolution

Image SQL Comments

Before image in trail

name='Jane'
phone='4444'
address='Holly'
salary=200
balance=200
comment=NULL
last_mod_time='9/1/10 8:00'

N/A

After image in trail

None

N/A

Target database image

None (row missing)

N/A

Initial DELETE applied by Replicat that detects the conflict

SQL bind variables:

1)'Jane'
2)'4444'
3)'Holly'
4)200
5)200
6)NULL
7)'9/1/10 8:00'

This SQL returns a no-data-found error. All columns are used in the WHERE clause because the COMPARECOLS statement is set to ALL.

SQL applied by Replicat to resolve the conflict

None

Because DISCARD is specified as the resolution for DELETEROWMISSING, so the delete from the trail goes to the discard file.