16.10 - Ways to Perform SQL Macros in Embedded SQL - Teradata Database

Teradata Database SQL Fundamentals

Product
Teradata Database
Release Number
16.10
Published
June 2017
Content Type
Programming Reference
Publication ID
B035-1141-161K
Language
English (United States)
Last Update
2018-04-25
IF the macro … THEN use …
is a single statement, and that statement returns no data
  • the EXEC statement to specify static execution of the macro

    -or-

  • the PREPARE and EXECUTE statements to specify dynamic execution.

Use DESCRIBE to verify that the single statement of the macro is not a data returning statement.

  • consists of multiple statements
  • returns data
a cursor, either static or dynamic.

The type of cursor used depends on the specific macro and on the needs of the application.