SET Usage Notes - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
  • All valid expressions except those containing subqueries are permitted in a SET statement assignment source.
  • Both assignment target and assignment source must be specified.
  • Assignment target is on the left hand side (LHS) of the SET expression.
  • Assignment source is on the right hand side (RHS) of the SET expression.
  • The data type of the assignment source must be compatible with the data type specified for the assignment target. Vantage performs implicit conversions for DateTime data types when the source data type differs from the target data type. For more information, see DateTime and Interval Data Types.
SET Assignment Component Valid Constructs Invalid Constructs
Assignment target
  • Local variable name
  • OUT or INOUT parameter name
  • QUERY_BAND variable name
  • Status variable
  • FOR loop column and correlation name
  • IN parameter
Assignment source Literal or an expression containing one of the following:
  • Local variable
  • IN or INOUT parameter
  • FOR loop column and correlation names when the SET statement is within the scope of the FOR statement
  • Constant expression
  • Status variable
  • OUT parameter
  • FOR loop column and correlation names when the SET statement is not within the scope of the FOR statement