Re: [問題] SAS proc sql的問題

看板Statistics作者 (心寬念純)時間17年前 (2009/04/09 20:08), 編輯推噓2(201)
留言3則, 1人參與, 最新討論串4/7 (看更多)
※ 引述《west1996 (焦了六年變脆了)》之銘言: : 剛剛推文漏了一行 : 改用回的好了 : proc sql; : creat table c as : select coalesce(a.var1,b.var1) label='var1',a.var2,b.var3 : from a full joint b : on a.var1=b.varl; : quit; : : 想請問 : : 如果我只想要把A表格的var1 var2 和 B表格的var1 var3抽出來 : : 再以var1為對照標準把表格A和B的var2與var3丢進去C表格裡面 : : 那我怎麼做最快 : : 感謝 我試了 proc sql; create table c as select coalesce( d003.f1,d004.f1 ) label='f1',d003.f2,d004.f3 from d003 full join d004 on d003.f1=d004.fl; quit; 出現了error ERROR: Column fl could not be found in the table/view identified with the correlation name D004. ERROR: Column fl could not be found in the table/view identified with the correlation name D004. ERROR: Expression using equals (=) has components that are of different data types. 但是我確定f1這個是樣本的流水號沒錯 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.115.165.142

04/10 02:46, , 1F
用proc contents看一下d003和d004的變數結構吧 照error看
04/10 02:46, 1F

04/10 02:46, , 2F
應該是資料本身哪裡有問題
04/10 02:46, 2F

04/11 18:55, , 3F
試試看用proc print或其他的東西看抓不抓的到d004裡的f1
04/11 18:55, 3F
文章代碼(AID): #19tULLSr (Statistics)
討論串 (同標題文章)
文章代碼(AID): #19tULLSr (Statistics)