IF... THEN...

Translation reference for the conversion of IF statements to Snowflake Scripting

circle-info

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentationarrow-up-right

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected]envelope.

Thank you for your understanding.

Description

The IF statement validates a condition and executes an action when the action is true. (Teradata SQL Language reference IF...THEN...arrow-up-right)

.IF <Condition> THEN <Action>;

<Condition> := <Status_variable> <Operator> Number
<Status_variable> := ACTIVITY_COUNT | ERRORCODE | ERRORLEVEL
<Operator> := ^= | != | ~= | <> | = | < | > | <= | >=
<Action> := BTEQ_command | SQL_request

Sample Source Patterns

Basic IF example

IN -> Teradata_01.bteq
-- Additional Params: -q SnowScript
.IF ACTIVITYCOUNT <> 0 THEN .GOTO InsertEmployee;

No related EWIs.

Last updated