ITERATE | VantageCloud Lake - ITERATE - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

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.