Command Execution in Macros | Basic Teradata Query - 17.00 - Command Execution in Macros - Basic Teradata Query

Basic Teradata® Query Reference

prodname
Basic Teradata Query
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-2414-220K

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

Teradata recommends echoing 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.