O'Reilly logo

Tera-Tom's 1000 page e-Book on Teradata by Tera-Tom Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required