proc SQL;
create view ynb2.count5 as
select '最近1年内' as tenor, count3_z.COL1 as CDL from ynb2.count3_z where obs=1
union all select '最近6月内' as tenor, count3_z.COL1 as CDL from ynb2.count3_z where obs=2
union all select '最近3月内' as tenor, count3_z.COL1 as CDL from ynb2.count3_z where obs=3
union all select '最近1月内' as tenor, count3_z.COL1 as CDL from ynb2.count3_z where obs=4;
本想以为观测号OBS=可以作为条件,但运行不了
请指教,用观测号作为限定条件应该怎么写作者: shiyiming 时间: 2008-10-8 11:43 标题: Re: 如何将观测号(即行号)作为sql select的限定条件 data ynb2.count5;
set ynb2.count3_z;
if _n_ in (1,2,3,4) then
output;
run;作者: shiyiming 时间: 2008-10-10 08:24 标题: Re: 如何将观测号(即行号)作为sql select的限定条件 replace 'obs' with 'monotonic()'