nullSecKeyCompare
The nullSecKeyCompare element is used to define how the Duplicate
Detect engine
behaves when it compares a non-null secondary key value to fields
containing a null value. The nullSecKeyCompare element has an attribute,
nullCompareDec, that indicates whether a null value compared with
a non-null value is or is not called a potential duplicate. Valid
values for nullCompareDec are:
- N - indicates that a null value compared to a non-null value is called a non-duplicate
- P - indicates that a null value compared to a non-null value is called a potential duplicate. This value is the default.
The following example shows how to specify an overall default value
for nullSecKeyCompare and override that default for specific fields:
<nullSecKeyCompare nullCompareDec="P">
<fields>
<field colName="EPC" nullCompareDec="N"/>
<field colName="AUX_ONUS" nullCompareDec="N"/>
</fields>
</nullSecKeyCompare>Setting the nullCompareDec attribute of the nullSecKeyCompare element specifies a default value for all null to secondary key comparisons. This default value is overridden for individual fields by using the fields element within nullSecKeyCompare. Specify a field element for each field to be overridden.
In the example, the overall null comparison default for the nullSecKeyCompare element is set to P for potential duplicate. The EPC and AUX_ONUS fields are overridden and set to N for non-duplicate.
Note:
- In the field element, the value specified for the colName attribute must exactly match the name of the secondary key. If a namespace contains a colName attribute that does not exactly match a column name in the database, the namespace is not loaded and an error is reported.
- When the nullSecKeyCompare element is not specified, or it does not have a nullCompareDec attribute, the default is that a null value compared with a non-null value is called a potential duplicate.