LABEL and GOTO

Translation reference to convert LABEL AND GOTO in SQL Server

Description

Snowflake SQL does not support GOTO LABEL statements. Currently, LABELS are commented and warning is added for all the occurrences.

Sample Source Patterns

The following examples details the BEGIN and COMMIT transaction statements.

SQL Server

IN -> SqlServer_01.sql
CREATE PROCEDURE GoToProcedure
AS
BEGIN
DECLARE @TotalMaarks INT
SET @TotalMaarks = 49;
IF @TotalMaarks >= 50
    GOTO Pass
IF @TotalMaarks < 50
    GOTO Fail
Pass:
    SELECT 1;
    RETURN 1;
Fail:
    SELECT 2;
    RETURN 2;
END

Snowflake SQL

LABEL and GOTO statement outside routines (functions and procedures)

SQL Server

Snowflake Scripting

Known Issues

No issues were found.

  1. SSC-EWI-TS0045: Labeled Statement is not supported in Snowflake Scripting.

  2. SSC-EWI-0073: Pending Functional Equivalence Review.

Last updated