|
|
5#

楼主 |
发表于 2010-8-31 00:57:26
|
只看该作者
Re: 数据集删除观测问题
[code:3xe8mkq6]proc sql;
create table ab as
select a.*,(a.id=b.id) as h
from a left join b
on a.id=b.id;
quit;[/code:3xe8mkq6]
That is my code, hope it works.
I have question for hopewell and could you explain for me.
1. ' from a left join (select distinct id, 1 as h from b) b ' . what does '1' stands for?
2. ' case b.h when 1 then 1 else 0 end as h '. I knew 'case when ...' expression,
but never saw 'case expression' like you did here, and it is absolutly correct. So could say more about your solution.
Thanks millions and really appreciate. |
|