ITERATE | VantageCloud Lake - ITERATE - 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

Terminates the execution of an iterated SQL statement and begins the next iteration of the iterative statement in the loop.

ITERATE runs the following actions depending on the referenced iteration statement.

Referenced Iteration Statement Result
FOR statement

IF a next row in the cursor, exists, execution continues with the next statement in the FOR loop.

IF a next row in the cursor does not exist, the cursor is closed and execution continues with the next statement outside the corresponding END FOR terminator for the FOR loop.

LOOP statement First statement inside the LOOP block runs unconditionally.
REPEAT statement First statement inside the REPEAT loop runs next, without any evaluation of the UNTIL clause.
WHILE statement

IF the conditional expression for the WHILE statement evaluates to TRUE, execution continues with the first statement inside the WHILE loop.

If the condition expression for the WHILE statement does not evaluate to TRUE, execution continues with the next statement outside the corresponding END WHILE terminator for the loop.

ANSI Compliance

ITERATE is ANSI/ISO SQL:2011-compliant.

Required Privileges

None.

Invocation

Executable

Stored procedures only.