请教问题如下:
data drugname;
input n name$20.;
cards;
1 drug_mp1
2 drug_mp2
3 drug_mp3
4 drug_co4_all_qc
5 drug_co5_all_qc
;
data abc;
set drugname;
do i=1 to 5;
if i=n then name1=&name;
call execute("proc sql; select count(DISTINCT id) into: ac FROM "||&name1||" where primaryid is not null; quit;");
ac=∾
end;
run;
期望的效果是 表abc 中每一行,生成ac列,值为每行对应name的表的列字段“id”的数量。
结果显示 WARNING: 没有解析符号引用 NAME1。
求大神帮忙解决