Use the Update driver’s Delete Task with or without variable substitution. If variable substitution is used, the Update driver requires a schema. The following sections give an overview of the steps needed to use the Update Delete Task.
Using DELETE in Delete Tasks
Deleting rows in a Delete Task is faster than deleting rows in an import task. The rules for using the DELETE statement in Delete tasks are:
- Only one special session can be connected
- Only one instance may be specified
- Only one DML group may be specified
- Only one DML statement in the DML group may be specified
- Only one target table may be specified
- The first error table is not used and is ignored
- Only one data record is provided if using variable substitution in the WHERE clause.
- There can be no calls to the EndAcquisition function.
Using the Update Delete Task Without Variable Substitution
- Set the TD_DELETE_TASK attribute to “Yes”.
- Add one DELETE statement to a DML group.
- Add the DML group to the Connection object.
- Initiate the Connection object.
- Call the ApplyRows function.
- Terminate the Connection object.
Do not add a schema to the Connection object.
Using the Update Delete Task with Variable Substitution
- Set the TD_DELETE_TASK attribute to “Yes”.
- Add the schema corresponding to the variable substitution to the Connection object.
- Add one DELETE statement to a DML group.
- Add the DML group to the Connection object.
- Initiate the Connection object.
- Use PutRow to pass in variable substitution data (one call only).
- Call the ApplyRows function.
- Terminate the Connection object.