The skills about merge,sql and conditional logic are all base on comparsion.Because it need to compare key with one or more keys in another table,it is slow and it would spend a lot of memory.What is more,if you use merge,you have to sort the data first.If the data happen to be a large data,the Merge method would be the worst.
Hashing is better method base on Direct-Addressing and it is much more convenient.
The is a Demo using hash.You can try it in another way like sql,merge to compare their efficiency.
- data a;
- input id type $;
- cards;
- 1 a,b
- 2 a
- 3 a,b,c
- ;
- run;
- data b;
- input key $ data $;
- cards;
- a xy
- b er
- c abc
- run;
- 1 xy,er



雷达卡






京公网安备 11010802022788号







