The following table describes the things to consider when using the DML LABEL command.
|Bypassing the Duplicate Row Check||Duplicate row checking is not performed if the table is a multiset table (which allows duplicate rows) or if the table has a unique primary index (the uniqueness test takes the place of the duplicate row check).|
|DO INSERT FOR ROWS Option||By following the rules for upsert operations, a number of uses for the DO INSERT ROWS option can be found.
With an upsert operation, Teradata MultiLoad needs only one pass of the data to both:
The alternative would be to either:
|Import Tasks||For import tasks, as many as five distinct error treatment options with one DML LABEL command can be specified. For example:
.DML LABEL COMPLEX IGNORE DUPLICATE INSERT ROWS MARK DUPLICATE UPDATE ROWS IGNORE MISSING UPDATE ROWS MARK MISSING DELETE ROWS DO INSERT FOR MISSING UPDATE ROWS;
|MARK MISSING UPDATE ROWS Option||Specifying MARK MISSING UPDATE ROWS while using the DO INSERT ROWS option, causes Teradata MultiLoad to record any update record that fails in the tname4 application error table, along with an error code indicating that the INSERT statement was then executed.
Then, if the insert operation fails, the insert record is also recorded in the application error table.
The default for an upsert operation, however, is to not mark missing update rows. This is because when the upsert feature is used, it expects the insert operation to occur when the update operation fails.
Failure of the update portion of an upsert operation does not, in itself, constitute an error and it is not to be treated as one.
|MARK MISSING DELETE ROWS Option||The MARK MISSING DELETE ROWS option has no meaning when used with the DO INSERT FOR ROWS option.|
|Upsert Feature||When using the upsert feature:
If P1 is char(5) and f1 is char(6), the upsert is canceled.