[程式] SAS的merge問題

看板Statistics作者 (meow)時間13年前 (2012/04/03 17:08), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
[軟體程式類別]: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
你的book11沒有 a這個變數阿
04/03 21:23, 1F
文章代碼(AID): #1FUhuKyo (Statistics)