Rules for FOR-Loop Variables - 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ā„¢
  • FOR loop variable names must be unique if they are used in nested FOR iteration loops.
  • FOR loop variable names can be the same as the cursor name and correlation names within a FOR iteration statement.
  • If you use a FOR loop variable in an SQL statement other than a control statement within the iteration statement, you must prefix it with a colon character (:).
  • Unqualified symbols in a FOR loop are assumed to be variable or parameter names.