gogotiger 发表于 2015-10-24 04:46:37

求教一个关于index的问题

data a(index=(id/unique));            

input id $3. map;

cards;



001 443

002 156

003 4259

004 643

005 1056

006 4590

;
run;


data b;

id='002';

set a key=id/unique;   

stop;

run;
上面的code首先是建立index ID,然后用index ID去寻找一个record (ID='002'),想得到dataset b (ID='002' MAP=156)但没有成功.
请问我为何得不到dataset b? 如何修改?
谢谢!


BioSas 发表于 2016-5-18 00:10:51

data b;
set a;   
where id='002';
run;

gogotiger 发表于 2016-11-8 23:00:19

BioSas 发表于 2016-5-18 00:10
data b;
set a;   
where id='002';


my question is about 'index' usage, not the query itself.
but thanks a lot!
页: [1]
查看完整版本: 求教一个关于index的问题