楼主: Trevor
|
5719
6
[讨论]SAS PROC SQL |
副教授 26%
-
TA的文库 其他...
|
回帖推荐sakunamary 发表于4楼 查看完整内容 proc sql ;
create table ab as
select
*
from a ina ,b inb
where ina.unikey=ina.unikey;
quit;
[此贴子已经被作者于2007-2-9 20:21:19编辑过]
You have two ways to do it:
1. Use 'case' function to create a new variable, 'case' is really similar like 'if ... then' in your datastep.
2. Use 'coalesce' with OUTER JOINS (full join, left join, right join) operations:
coalesce (a.id, 0) will change all missing values or unmatched values of a.id as 0.
coalesce (b.id, 9999) will change all unmatched or missing value of b.id as 9999.
data ...
本帖被以下文库推荐
| ||
| ||
我sas故我在
|
|
| ||
我sas故我在
|
||
| ||
京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明 免责及隐私声明