Command Execution in Macros - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
16.00
Published
November 2016
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
hyz1479325149183.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

BTEQ executes commands and SQL statements in the same order they were entered. Each BTEQ command must be enclosed in a Teradata SQL ECHO statement. When the macro is executed, Teradata Database executes the Teradata SQL statements and returns the contents of the ECHO statements (the BTEQ commands) to BTEQ.

It is recommended to echo BTEQ commands only in Field Mode, otherwise unexpected results might occur. No error messages are issued, and the echoed text might be dumped rather than executed.