作者innateness (meow)
看板Statistics
标题[程式] SAS的merge问题
时间Tue Apr 3 17:08:33 2012
[软体程式类别]:SAS
[程式问题]:
资料处理
[软体熟悉度]:
新手(不到1个月)
[问题叙述]:
我试着要merge。但是出现
Variable year has been defined as both character and numeric.
於是我是试着把variable year变成numeric,但是似乎出现一些问题。
烦请大家帮忙,谢谢!!
proc sort data=book11; by mgrno mgrnoyear; run;
proc sort data=book22; by mgrno mgrnoyear; run;
data c;
merge book11 book22; by mgrno mgrnoyear; run;
ERROR: Variable year has been defined as both character and numeric.
data book11;
set book11(rename=(a=olda));
ERROR: Variable a is not on file WORK.BOOK11.
ERROR: Invalid DROP, KEEP, or RENAME option on file WORK.BOOK11.
year=input(olda,8.);
run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
54:12
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 1.168.223.198
※ 编辑: innateness 来自: 1.168.223.198 (04/03 17:09)
1F:推 imaltar:你的book11没有 a这个变数阿 04/03 21:23