大概是這個(gè)意思:
proc sql;
create table newtable as
select a.*, b.var1, b.var2, ...
from old_table1 a left join old_table2 b
on a.id=b.id;
quit;
樓主: 張龍洋
|
2135
5
球sas l兩表橫向連接代碼. |
本科生 16%
-
|
3論壇幣
最佳答案大概是這個(gè)意思:
proc sql;
create table newtable as
select a.*, b.var1, b.var2, ...
from old_table1 a left join old_table2 b
on a.id=b.id;
quit;
回帖推薦wwang111 發(fā)表于2樓 查看完整內(nèi)容 大概是這個(gè)意思:
proc sql;
create table newtable as
select a.*, b.var1, b.var2, ...
from old_table1 a left join old_table2 b
on a.id=b.id;
quit;
glovea 發(fā)表于5樓 查看完整內(nèi)容 proc sort data=a1;by id;run;
proc sort data=a2;by id;run;
data a3;
merge a1(in=a)
a2
;
by id;
if a;
run;
| |
| ||||||||||||||
| ||||||||
| ||
京ICP備16021002-2號(hào) 京B2-20170662號(hào) 京公網(wǎng)安備 11010802022788號(hào) 論壇法律顧問(wèn):王進(jìn)律師 知識(shí)產(chǎn)權(quán)保護(hù)聲明 免責(zé)及隱私聲明