16.20 - Creating Reports with Macros - Basic Teradata Query

Basic Teradata Query Reference

Basic Teradata Query
October 2018
Programming Reference

Create a report from a macro by instructing BTEQ in a prepared script or input stream file to export the data returned as a report. To do this, use one of the following options:

  • Create a macro on a Teradata Database and execute it from the script file.

    In this case, the macro contains the appropriate BTEQ commands to generate a report, and the script file contains the BTEQ EXPORT command, the Teradata EXECUTE macro statement, and other BTEQ commands. This is the preferred method.

  • Place the macro in the script file and create and execute it from there.

    This method creates the macro every time it executes the request, which is a major disadvantage.