EXIT or QUIT

Translation reference for the conversion of EXIT or QUIT command to Snowflake Scripting

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 Documentation

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

Thank you for your understanding.

Logs off all database sessions and then exits BTEQ.

The highest severity value encountered during BTEQ's execution will by default be used as BTEQ's return code value unless an argument is explicitly supplied. (Teradata Basic Query Reference EXIT or QUIT Command)

.<ExitCommand> [<Result>];
<ExitCommand> := EXIT | QUIT
<Result> := <Status_variable> | Number 
<Status_variable> := ACTIVITY_COUNT | ERRORCODE | ERRORLEVEL

Sample Source Patterns

Basic IF example

IN -> Teradata_01.bteq
-- Additional Params: -q SnowScript
.QUIT ERRORCODE;
OUT -> Teradata_01.sql
EXECUTE IMMEDIATE
$$
  DECLARE
    STATUS_OBJECT OBJECT := OBJECT_CONSTRUCT('SQLCODE', 0);
  BEGIN
    RETURN STATUS_OBJECT['SQLCODE'] /*** SSC-FDM-TD0013 - THE SNOWFLAKE ERROR CODE MISMATCH THE ORIGINAL TERADATA ERROR CODE ***/;
  END
$$

Known Issues

When the EXIT or QUIT command doesn't have an input, it returns the ERRORLEVEL as default. However, SnowConvert transforms it to return 0.

  1. SSC-FDM-TD0013: The Snowflake error code mismatch the original Teradata error code.

Last updated