WHILE

Translation reference to convert Teradata WHILE statement to Snowflake Scripting

Description

Teradata's WHILE statement is translated to Snowflake ScriptingWHILE syntax.

For more information on Teradata While, check here.

[label_name:] WHILE conditional_expression DO
    { sql_statement }
END WHILE [label_name];

Sample Source Patterns

Teradata

REPLACE PROCEDURE whileProcedure(OUT resultCounter INTEGER)
BEGIN
    DECLARE counter INTEGER DEFAULT 0;
    customeLabel: WHILE counter < 10 DO
        SET counter = counter + 1;
    END WHILE customeLabel;
    SET resultCounter = counter;
END;

CALL whileProcedure(:?);

Snowflake Scripting

Known Issues

No issues were found.

No related EWIs.

Last updated

Was this helpful?