理想的情况是,你应确定来源,以便所有栏目都与总计划界定的类型相同。 选择只是放弃这个领域,这似乎使你能够利用欧佩克方案。
这里有一些准则可以找到问题一栏,以便你能够人工确定。
*Code to isolate the variable/tables that may be the issue;
proc sql;
create table variable_types as
select libname, memname, upper(name) as name, type
from sashelp.vcolumn
where libname= WORK and upper(memname) like CLASS%
order by name, type;
create table variable_mismatch as
select *
from variable_types
where name in (select name from variable_types group by name having min(type) ne max(type));
quit;
在这里,如果你只是想放弃需要纳入宏观结构的变量,那么就有一些准则。
*Create sample datasets;
data class;
set sashelp.class;
run;
data class2;
set sashelp.class(rename=age=age_num);
age=put(age_num, 2.);
run;
*Append via data step - generates error;
data want;
set class class2;
run;
*Append via proc append;
proc append base=class data=class2 force;
run;