Date: Tue, 6 Sep 2005 11:42:37 -0700
Reply-To: Toby <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Toby <tobydunn@HOTMAIL.COM>
Organization: http://groups.google.com
Subject: Re: limiting sql rows by calculated monotonic()
In-Reply-To: <3o641nF4cn4fU1@individual.net>
Content-Type: text/plain; charset="iso-8859-1"
Nina,
There are several ways here are two:
proc sql;
create table b as
select *
from a
where monotonic() < 10
order by x
;
quit;
and
proc sql ;
select *
from a (obs = 9)
order by x ;
quit ;
Toby Dunn
are there better ways of doing this?
the goal is to "look and analyze" at the data coming from a hundred
million
row table first before running a full throttle query
* this is here just to generate some sample data
in real life this would not exist as the sql connection would provide
the
data;
data a;do x=1000 to 500 by -1;output;end;
proc sql;
create table b as select *, monotonic() as _m_ from a
where calculated _m_ < 10
order by x
;
quit;
data _null_;set b;put(_all_)(=);run;
Reply