Call macro inside a macro based on some condition

General
Enthusiast

Call macro inside a macro based on some condition

Hi

I want to call a macro inside a macro based on some condition.

Say:

replace macro testMacro1(Name varchar(20))
as
(
if ( :Name='XYZ')
then exec testMacro2
else
exec testMacro3
);

How to implement this thing in TD Macro ?
Thanks in advance
Tags (1)
2 REPLIES
Enthusiast

Re: Call macro inside a macro based on some condition

in macros it is possible to exec only sql statements.
keep this code in bteq and execute .
Junior Supporter

Re: Call macro inside a macro based on some condition

Use SP's instead.

BTW what part of "Do not post SQL or database questions here" in the General forum charter you don't understand?

Cheers.

Carlos.