Execute Macro from Stored Procedure???

Database
Teradata Employee

Execute Macro from Stored Procedure???


i know you can execute MAcros from within a Stored procedure. Looking in the SPL manual it says you can't execute the macro with EXECURE ...(); There is reference to DECLARE CURSOR (MACRO) form. It's not very clear but do I make this declaration, then when I open the cursor does it execute the macro and return the result(s) with my fetch? i.e. not to sure on teh 'mecanics' of the process. Any pointers would help and be much appreciated. If there is an 'example' - that would be even better.

Thanks in advance to all!

JK
2 REPLIES
N/A

Re: Execute Macro from Stored Procedure???

Hi JK,
the DECLARE CURSOR(MACRO) is only for Embedded SQL, but not SPs.
You can call an SP from a macro, but not vice versa.

Dieter

Re: Execute Macro from Stored Procedure???

Hi Dieter, 

Can you help me with the syntax of calling procedure from macro. 

When I am trying to do the same - it says - 

5497   CALL cannot be submitted in multi-statement request.

Thanks

Abhishek