Re: [問題] SAS proc sql的問題
※ 引述《hanjing (心寬念純)》之銘言:
: ※ 引述《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;
: 我試了
: 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.
感覺是colesce有問題
http://www.techonthenet.com/oracle/functions/coalesce.php
full join的話就是要同時存在於兩個table
你寫a.var1跟b.var1其實是一樣的
你要用var1當FK
又要if then兩個table的 var1
我個人感覺是會出包
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.167.175.84
推
04/10 19:11, , 1F
04/10 19:11, 1F
→
04/10 19:11, , 2F
04/10 19:11, 2F
推
04/11 18:50, , 3F
04/11 18:50, 3F
→
04/11 18:50, , 4F
04/11 18:50, 4F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 6 之 7 篇):