Use of Semicolons in Multi-Statement Processing | Basic Teradata Query - Multi-Statement Processing - 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

In a multi-statement request, the semicolons that begin the line are used only to separate the statements. BTEQ does not submit any of the statements to Analytics Database until it encounters a semicolon as the last nonspace character of a line. At that time, BTEQ sends all statements for processing as one single request.

Do not use an ANSI comment statement in conjunction with a semicolon character to indicate the final statement of a multi-statement request. If the semicolon appears after an ANSI comment, it is treated as part of the comment text string. If it appears before an ANSI comment, it does not qualify as the last nonspace character on the line.

For complete documentation on Teradata SQL, see Teradata Vantage™ - SQL Fundamentals, B035-1141.