[程式] SAS的merge問題
[軟體程式類別]: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)
推
04/03 21:23, , 1F
04/03 21:23, 1F