Masking commas within a macro parameter
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Masking commas within a macro parameter Expand / Collapse
Author
Message
Posted 3/29/2007 9:47:05 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 4/2/2007 7:28:00 PM
Posts: 3, Visits: 1
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.

Post #7016
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 12:22am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 10 queries. Compression Disabled.