Translation reference for the conversion of IF statements to Snowflake Scripting
Last updated 1 year ago
The IF statement validates a condition and executes an action when the action is true. ()
.IF <Condition> THEN <Action>; <Condition> := <Status_variable> <Operator> Number <Status_variable> := ACTIVITY_COUNT | ERRORCODE | ERRORLEVEL <Operator> := ^= | != | ~= | <> | = | < | > | <= | >= <Action> := BTEQ_command | SQL_request
-- Additional Params: -q SnowScript .IF ACTIVITYCOUNT <> 0 THEN .GOTO InsertEmployee;
EXECUTE IMMEDIATE $$ DECLARE STATUS_OBJECT OBJECT := OBJECT_CONSTRUCT('SQLCODE', 0); BEGIN IF (STATUS_OBJECT['SQLROWCOUNT'] != 0) THEN RETURN 1; END IF; END $$
No related EWIs.