Welcome to the Teradata Developer Exchange discussion forums.
For a general introduction and guidelines on posting, please see
this forum topic.
RSS feeds are available for each forum, as well as a combined
all forums feed.
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.
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.