偶想生成十九个新的表格,于是用宏试了试,不过错得厉害,不知道怎么改,烦请高手帮忙看看
%macro collapse;
%do i=1 %to 19;
%let j=%eval(1987+&i);
proc sql;
create table ch.y&i as select ch.nyear&i.*,full04.* from ch.nyear&i, ch.full04
where nyear&i.code=full04.code and full04.year='&j';quit;
%end;
run;
%mend collapse;
%collapse;