Chapter 28

Macro Functions

“Don't count the days. Make the days count.”

–Muhammad Ali

Table of Contents Chapter 28 – Macro Functions

The 14 rules of Macros

CREATING and EXECUTING a Simple Macro

Multiple SQL Statements inside a Macro

Complex Joins inside a Macro

Passing an INPUT Parameter to a Macro

Troubleshooting a Macro with INPUT Parameters

Troubleshooting a Macro with INPUT Parameters

An UPDATE Macro with Two Input Parameters

Executing a Macro with Named (Not Positional) Parameters

The 14 rules of Macros

1.   Macros can contain one or more SQL Statements

2.   Macros are a database Extension in Teradata and not ANSI-Standard

3.   Macros don't require PERM Space

4.   Macros are stored in the Data Dictionary in the USER DBC ...

Get Tera-Tom's 1000 page e-Book on Teradata now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.