Rules for FOR-Loop Correlation Names - Teradata Vantage - Analytics Database
SQL Stored Procedures and Embedded SQL
- Deployment
- VantageCloud
- VantageCore
- Edition
- VMware
- Enterprise
- IntelliFlex
- Product
- Analytics Database
- Teradata Vantage
- Release Number
- 17.20
- Published
- June 2022
- ft:locale
- en-US
- ft:lastEdition
- 2023-10-30
- dita:mapPath
- frc1628111662093.ditamap
- dita:ditavalPath
- qkf1628213546010.ditaval
- dita:id
- rjx1472253414573
- lifecycle
- latest
- Product Category
- Teradata Vantageā¢
- A correlation name must be unique in a FOR iteration statement; however, the same correlation name can be used both for nested and non-nested FOR iteration statements.
- A correlation name can be the same as the FOR loop variable and the names of cursors within a FOR iteration statement.
- Columns and correlation names must be qualified with a FOR loop variable when referenced in SQL statements, including control statement, within the iteration statement.
- If a column or correlation name is not qualified, then column and correlation name references are treated as either parameters or local variables.
- The scope of a FOR iteration statement correlation name is the body of the statement.