16.20 - Coding the APPLY Statement - Parallel Transporter

Teradata® Parallel Transporter User Guide

Product
Parallel Transporter
Release Number
16.20
Published
August 2020
Language
English (United States)
Last Update
2020-08-27
dita:mapPath
uah1527114222342.ditamap
dita:ditavalPath
Audience_PDF_product_tpt_userguide_include.ditaval
An APPLY statement typically contains two parts, which must appear in the order shown:
  1. A DML statement (such as INSERT, UPDATE, or DELETE) that is applied TO the consumer operator that will write the data to the target, as shown in the following figure. The statement may also include a conditional CASE or WHERE clause.
    Multiple Insert Statements

  2. For most jobs, the APPLY statement also includes the read activity, which uses a SELECT FROM statement to reference the producer operator. If the APPLY statement uses a standalone operator, it does not need the SELECT FROM statement.
    In the following figure, the SELECT statement also contains the UNION ALL statement to combine the rows from two SELECT operations against separate sources, each with its own operator.
    SELECT Statement in an APPLY Statement