How to Create a Macro | Basic Teradata Query - 17.00 - Creating a Macro - 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

To create a macro, enter the SQL CREATE MACRO and ECHO statements in an interactive BTEQ session as follows:

CREATE MACRO macroname AS 
( ECHO  '.BTEQcommand'
  ;SQLrequest;  
 );