LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 22 Jan 2008 07:14:34 -0800
Reply-To:   Melodyp <pearsonmelody@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Melodyp <pearsonmelody@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: How to randomly select records from a large data set?
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=ISO-8859-1

On Jan 21, 3:47 pm, Melodyp <pearsonmel...@gmail.com> wrote: > Hello! I have a question on how to select about 8500 records from a > nearly one million records dataset. > > The 8500 records must be randomly selected. > > Thank you in advance for your help. > > Melody

Thank you Julia, Ken and son for your helps. When tried the method Julia provided, I obtianed the following error: =========================================================== 2 proc sql outobs = 8500; 3 create table melody.Melody_2_small as 4 select A.* 5 from melody.melody_2 as A 6 order by ranuni(4537); NOTE: The query as specified involves ordering by an item that doesn't appear in its SELECT clause. ERROR: Write to WORK._tf0006.UTILITY failed. File is full and may be damaged. NOTE: Error was encountered during utility-file processing. You may be able to execute the SQL statement successfully if you allocate more space to the WORK library. NOTE: Table MELODY.MELODY_2_SMALL created, with 0 rows and 670 columns. ===========================================================

When trid Ken and Son's method use : proc surveyselect data=melody.melody_2 out=melody.melody2_small; sampsize=8500; run;

I also get error.

Where did I do wrong?

Thank you again for your help.

Melody


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