All Forums Database
Alex181 11 posts Joined 08/14
17 Feb 2015
Executing a Macro

Hi ,
Could someone help me with the following. Since I have the create table option within the macro, I need to change the tablename everytime I execute this macro with different parameters.
Is there a way around it? without having to change the table name everytime I execute this macro.
create macro ex1
C_name  varchar(30),
 V_name varchar(30)
create multiset table table1 as
select * from tablename
where Cname =: C_name
and Vname =: V_name;
with data primary index (name);
exec ex1 (C_name ='XYZ',V_name='ABC')
Thank you in advance!

You must sign in to leave a comment.