Using DELETE in Import Tasks
DELETE is a Teradata SQL statement that removes rows from a table or view that was previously identified as a target table through the use of the TD_TARGET_TABLE attribute.
The rules for using the DELETE statement in Stream import tasks are:
The procedure for using the DELETE statement in a Stream import task is:
1 Add a DELETE statement to a DML group
2 Add the DML group to the Connection object
3 Initiate the Connection object
4 Set the DML group containing the DELETE statement using the UseDMLGroups function
5 Make at least one call to the PutRow function
If the DML group only contains a DELETE statement, then no data will be loaded as a result of the PutRow function call.
6 Call the EndAcquisition function
7 Terminate the Connection object
Note: If no row in the target table matches the DELETE statement, then the row of data sent with the DELETE statement will be put into the error table.