data test1;
x=1;output;
x=2;output;
run;
data test2;
y=1;output;
y=2;output;
run;
%macro set(datin=);
proc sql;
create table final as
select (case when &datin.="test1" then x when &datin="test2" then y else . end) as z from &datin;quit;
%mend;
%set(datin=test2);
这段code 为什么会报错, 这个case语句似乎没有进行判断,不知道哪里不对,望指教,谢谢