sweet-air 发表于 2010-4-10 19:43 
合并两个数据表时出现warning说"输入数据集为 BY 变量 a指定了多个长度,可能导致意外结果"什么原因?
Here is an example to help you to understand how SAS is doing in this case.
data t1;
do id=1 to 3;
a='333';
output;
end;
run;
data t2;
do id=3 to 5;
a='22';
output;
end;
run;
data all;
merge t1 t2;
by id;
run;
proc print; run;
data all;
merge t2 t1;
by id;
run;
proc print; run;
data all;
length a $4;
merge t2 t1;
by id;
run;
proc print; run;