Tech Tips
How do you declare a variable inside a Teradata
macro?
There is no facility to declare variables inside a
Teradata macro. You can, however, pass values into the
macro by means of input parameters. These values will
then be embedded in the SQL statements that the macro
contains. Teradata stored procedures, on the other hand,
support IN, OUT and INOUT parameters, as well as the
ability to declare variables within the procedure itself.
Such variables could be useful as counters when you
have looping logic, for example.
|