Example: Upsert Without ELSE Clause - Advanced SQL Engine - Teradata Database

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qtb1554762060450.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

This example shows an upsert UPDATE request that fails to specify the ELSE keyword.

     UPDATE sales
     SET item_count = item_count + 1
     WHERE (item_nbr = 10
     AND    sale_date = '05/30/2000')
     INSERT INTO sales (10, '05/30/2000', 1);

This case returns a syntax error to the user.