Question
This is on Teradata specifically, but in general, is it possible for a macro to accept a list as a parameter? E.g.,
create macro myMacro ( incomingList ) AS
(
select foo
from tBar
where animal in (:incomingList );
);
...and then...
exec myMacro( ('chicken','pig','cow') );
Solution
As far as I know, Teradata does not support such kind of macro definition. You must specify a data type associated with the parameter.
You can check out this document: SQL Data Definition Language - Syntax and Examples and look at the macro part. http://www.info.teradata.com/edownload.cfm?itemid=091260012
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow