Hi as the errorsays, you have different types for columns with the same name.
See the code below that illustrates this, it also shows you how you can list type and length for a column. you need to do a type conversion.
data have1;
set sashelp.class;
run;
data have2;
set sashelp.class(rename=(sex=sex_c age=age_n));
sex = ifn(sex_c = "M", 1, 2);
age = put(age_n, 8. -L);
drop sex_c age_n;
run;
options nolabel;
proc sql;
select
libname
, memname
, lowcase(name) as name
, type
, length
, varnum
from
dictionary.columns
where
libname = "WORK"
and memname like "HAVE%"
order by
name
, memname
;
quit;
options label;
proc sql;
create table want as
select
*
from
have1
outer union corr
select
*
from
have2
;
quit;
data want2;
set have1 have2;
run;
... View more