Using the DDL Operator in an APPLY Statement - Parallel Transporter

Teradata® Parallel Transporter User Guide

Product
Parallel Transporter
Release Number
17.00
Published
August 31, 2020
Language
English (United States)
Last Update
2020-08-27
dita:mapPath
zae1544831938751.ditamap
dita:ditavalPath
tvt1507315030722.ditaval
dita:id
B035-2445
lifecycle
previous
Product Category
Teradata Tools and Utilities

The DDL operator can be specified in the APPLY statement in either single or multi-statement format. To execute each statement as its own transaction, you should have one SQL statement per DML group (enclosed in parentheses).

If more than one statement is specified in a DML group, the operator combines them all into a single multi-statement request and sends it to the database as one transaction. The database enforces the rule that a multi-statement DML group can have only one DDL statement and it must be the last statement in the transaction, which means the last statement in the group. The SQL statements are executed by groups in the order they are specified in the APPLY statement. If any statement in the group fails, then all statements in that group are rolled back and no more groups are processed.

The following is a simplified example of a DDL operator in a single-statement format:
APPLY
'SQL statement1',
'SQL statement2',
.........
'SQL statementN'
TO OPERATOR (operator_specifications)
The following is a simplified example of a DDL operator in a multi-statement format:
APPLY
('SQL statement1a', 'SQL statement1b', .........),
('SQL statement2a', 'SQL statement2b', .........),
.........
('SQL statementNa', "SQL statementNb', .........)
TO OPERATOR (operator_specification)