LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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>
Subject:      Re: limiting sql rows by calculated monotonic()
Comments: To:
In-Reply-To:  <>
Content-Type: text/plain; charset="iso-8859-1"


There are several ways here are two:

proc sql; create table b as select * from a where monotonic() < 10 order by x ; quit;


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;


Back to: Top of message | Previous page | Main SAS-L page