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

SQL Fundamentals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
zwv1557098532464.ditamap
dita:ditavalPath
lze1555437562152.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.