sas - proc sql join in do loop with macro -
i trying join on 15 tables , wrote macro has 2 loops , program wrote way.
%macro joinnow (year, tno); %do year=1991 %to 2012; %do tno=2 % 23; full join a_&year t&tno on t1.id=t&tno.id %end; %end; %mend; now run program
proc sql; create table new_tab select t1.*, t2.reg_1991,-----,t23.reg_2012 a_1990 t1 %joinnow; ; quit; i error saying
error: column reg_2002 not found in table/view identified correlation name t13. where reg_2002 present in t13
can see error is?
Comments
Post a Comment