17.05 - Modification of a Row for Upsert - Teradata Database

Teradata Vantage™ - Temporal Table Support

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
17.05
created_date
June 2020
category
Programming Reference
featnum
B035-1182-170K

A current upsert results in a current update if the qualified current row is found; otherwise, it results in a current insert. For a row-partitioned table, a current update must not result in rows moving to different partitions.

The insert portion of a current upsert can specify values for the valid-time or transaction-time column and the insert must be to the same partition as referenced by the update portion.

In a sequenced upsert, if the qualified row overlaps with the specified (or default) period of applicability, a sequenced form of update is performed on that row; otherwise, a sequenced form of insert is performed. For a row-partitioned table, the sequenced form of update must not result in rows moving to different partitions.

The insert portion of a sequenced upsert can specify values for the valid-time or transaction-time column and the insert must be to the same partition as referenced by the update portion. If the insert portion of a sequenced upsert specifies a value for the valid-time column, the specified period of applicability in the temporal qualifier is ignored for the insert portion of the upsert.

For a nonsequenced upsert, a nonsequenced update is performed if a row is found; otherwise, a nonsequenced insert is performed.