Ways to Execute SQL Macros in Embedded SQL - Advanced SQL Engine - Teradata Database

SQL Fundamentals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
uhe1592872955107.ditamap
dita:ditavalPath
uhe1592872955107.ditaval
dita:id
B035-1141
lifecycle
previous
Product Category
Teradata Vantage™
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.