Teradata Database Message 5562 - 17.10 - 5562 - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Database Messages

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1096-171K
Language
English (United States)
Message
The UPDATE part of the UPSERT statement is not a single-AMP operation.
Explanation
The UPDATE part of the UPSERT statement is not a single-AMP operation, this could be due to one or more of the following reasons: 1. The user did not fully specify the primary index in the UPDATE part of the UPSERT statement. The same fully specified primary index must be used on both the UPDATE and INSERT parts of an UPSERT statement, since the purpose of an UPSERT is to find a row or rows to update, and if no row is found to insert a corresponding row into the table. 2. The WHERE clause of the UPDATE part of the UPSERT statement compares the fully specified primary index against another field of the same table. This results in an all-AMP update. 3. The WHERE clause of the UPDATE part of the UPSERT statement compares the fully specified primary index against some value using a non-equality constraint. This also results in an all-AMP update. 4. The WHERE clause of the UPDATE part of the UPSERT statement compares the fully specified primary index with an operand of a different data type. This could cause the system to convert the primary index values to match the data type of the operand and thus result in an all-AMP update.
Generated By
Parser.
For Whom
End User.
Notes
None
Remedy
Correct the UPSERT statement and resubmit.