Creating a Macro

Basic Teradata Query Reference

brand
Teradata Tools and Utilities
prodname
Basic Teradata Query
vrm_release
16.20
category
Programming Reference
featnum
B035-2414-108K

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

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