views:

31

answers:

1

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') );
A: 

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

Wei