Macro Variable TYPE, and a quiz
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.


Macro Variable TYPE, and a quiz Expand / Collapse
Author
Message
Posted 3/26/2008 4:34:04 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 3/27/2008 5:16:43 PM
Posts: 7, Visits: 8
Hi,

How pass string like 'va', 'vb', 'vc' as one input?

Say the code like this

create macro macro_name (input_name input_type) as (
select columns
from table_x
where table_x.column_y in (:inputname)
group by 1,2 order by 1,2;
)

execute macro_name (how-to-pass);

Post #11054
Posted 3/26/2008 4:53:11 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 3/27/2008 5:16:43 PM
Posts: 7, Visits: 8
what are the input_type and how-to-pass there?

Thanks a ton.
Post #11055
Posted 3/29/2008 9:45:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/4/2008 3:57:27 AM
Posts: 5, Visits: 43

use varchar(255), and format the all the variables into one string passed to macro.

Do you want to consturct a dynamic query? Store procedure can achieve the goal.
Post #11091
« 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 10:30pm

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