作者hanjing (心宽念纯)
站内Statistics
标题Re: [问题] SAS proc sql的问题
时间Thu Apr 9 20:08:52 2009
※ 引述《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
1F:推 west1996:用proc contents看一下d003和d004的变数结构吧 照error看 04/10 02:46
2F:→ west1996:应该是资料本身哪里有问题 04/10 02:46
3F:推 west1996:试试看用proc print或其他的东西看抓不抓的到d004里的f1 04/11 18:55