EXIT or QUIT Command | Basic Teradata Query - EXIT (Q) or QUIT (Q) - Basic Teradata Query

Basic Teradata® Query Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Basic Teradata Query
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
gxl1691484661681.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
psp1479308573013
Product Category
Teradata Tools and Utilities

Purpose

These commands allow the users to log 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.

Syntax



Shorthand Syntax (Interactive Mode Only)
Command Shorthand
EXIT/QUIT Q
Option Shorthand Option Shorthand
ACTIVITYCOUNT AC DELETECOUNT DC
INSERTCOUNT IC UPDATECOUNT UC
ERRORCODE EC ERRORLEVEL EL
WARNINGCODE WC BTEQRETURNCODE BRC
SYSTEMRETURNCODE SRC    

where the following is true:

n
A decimal number as the job step return code.

To avoid existing codes, do not use numbers 1 through 10.

status_value_keyword
One of the following status value keywords: ACTIVITYCOUNT, ERRORCODE, ERRORLEVEL, WARNINGCODE or SYSTEMRETURNCODE. SYSTEMRETURNCODE can be specified only when using Windows BTEQ. ACTIVITYCO will also be accepted in place of ACTIVITYCOUNT. See Status Value Keywords for full descriptions of each value.

Usage Notes

The EXIT and QUIT commands are identical. The alternate command name, QUIT, is supplied to enable users to employ stylistic conventions that differentiate normal versus non-normal exit paths in input scripts submitted in batch mode. For example, some users prefer to use QUIT when the BTEQ process exit is to come at the end of an error-handling portion of their input script. Another example is that some users prefer to use an EXIT command after explicit use of the LOGOFF command and use QUIT where a LOGOFF command has not used but sessions might still be logged on.

The EXIT command cannot be used in an SQL macro.

The maximum value supported for a return code can vary from one vendor's OS to another. This should be taken into consideration when changing default return code behavior to prevent BTEQ from returning possible corrupted values.

Example - EXIT

To exit BTEQ, type:

.EXIT