由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 怎样用hash table做full join?
相关主题
问个Excel的小问题70 题中的第29题答案是不是错了啊?
SAS问题,关于@和@@的区别sas base 70 key -errors
请教Base 70 中的一题 关于@sas base 70的两道题
[合集] way to do exclusive outer join by proc sqlsas base question help (70)
请教sas base 70题里第29题。。。菜鸟麻烦大家帮我看看sas base 70题的29和123题的15题
【包子】merge 语句里的(in= )如何重复运行sas程序100次,并把100次的结果全部output?
请问一道SAS BASE的题目,THANKS~~~SAS question (紧急求助,在线等)
面经 risk analystSAS 编程问题 (有包子)
相关话题的讨论汇总
话题: table话题: hash话题: join话题: full话题: input
进入Statistics版参与讨论
1 (共1页)
i******r
发帖数: 861
1
data A;
Input x1 $ y1;
Cards;
A 10
B 20
C 30
;
Run;
Data B;
Input x2 $ y2;
Cards;
A 1
C 8
D 9
;
Run;
希望得到:
x1 y1 x2 y2
A 10 a 1
B 20 . .
C 30 C 8
. . D 9
我希望用hash table的方法
b*********n
发帖数: 2975
2
Hash table不是这么玩儿的, 你这个用merge 就行了
i******r
发帖数: 861
3
能不能够哪怕提示一下怎么写啊?google不到任何code写法

【在 b*********n 的大作中提到】
: Hash table不是这么玩儿的, 你这个用merge 就行了
R*****d
发帖数: 420
4
我觉得用sql full outer join 也可以。
select a.col1, a.col2, b.col1, b.col2 from tableA a full outer join tableB b
on a.col1=b.col1; something like this.
sas sql should have it.

【在 i******r 的大作中提到】
: 能不能够哪怕提示一下怎么写啊?google不到任何code写法
S******3
发帖数: 66
5
SAS hash can do inner join/left join easily.
just for learning purpose, full join is simply a left join + all records in
2nd table that can't be found in the 1st table. By this way, you need load
both table into hash (one full table + one table with key only); and you
need scan both tables once completely, so may not worth much of Hash.
i******r
发帖数: 861
6
我也是这么想。我可以写出left join来得到你说的第一个table,但是怎么得到第二个
呢?需要iter吗?你能不能写一个code?帮帮我们这些初学者,也可以提高这里的份量啊

in

【在 S******3 的大作中提到】
: SAS hash can do inner join/left join easily.
: just for learning purpose, full join is simply a left join + all records in
: 2nd table that can't be found in the 1st table. By this way, you need load
: both table into hash (one full table + one table with key only); and you
: need scan both tables once completely, so may not worth much of Hash.

1 (共1页)
进入Statistics版参与讨论
相关主题
SAS 编程问题 (有包子)请教sas base 70题里第29题。。。
请教sas中两个数据有条件地合并问题【包子】merge 语句里的(in= )
求教sas adv请问一道SAS BASE的题目,THANKS~~~
[合集] hash table and large dataset面经 risk analyst
问个Excel的小问题70 题中的第29题答案是不是错了啊?
SAS问题,关于@和@@的区别sas base 70 key -errors
请教Base 70 中的一题 关于@sas base 70的两道题
[合集] way to do exclusive outer join by proc sqlsas base question help (70)
相关话题的讨论汇总
话题: table话题: hash话题: join话题: full话题: input