How to Create Reports with Macros | Basic Teradata Query - Creating Reports with Macros - Basic Teradata Query

Basic Teradata® Query Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Basic Teradata Query
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
gxl1691484661681.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
psp1479308573013
Product Category
Teradata Tools and Utilities
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 within a 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 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.