Masking commas within a macro parameter

Analytics
N/A

Masking commas within a macro parameter

Hi,

I was wondering if anyone knows a simple way of masking a comma within a given macro parameter so that Teradata doesn't interpret the parameter as multiple parameters.

eg:
CREATE MACRO test(prodno) AS
(
SELECT *
FROM products
WHERE product_code IN (:prodno)
;
);

EXEC test(12, 13);

The number of products could be one or more (ie a variable number).

Obviously the macro and execution, as is, produces an error as Teradata is only expecting one parameter, but sees two.

Is there a simple way around this?

Thanks in advance for your help.

Cheers,
Scott.