Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Top N records 1

Status
Not open for further replies.

DonaZ

Technical User
Oct 10, 2007
41
US
Hi
How do you select the top N records using Proc SQL in SAS?

Thank you in advance for your time.

 
You can't really, not that I'm aware of.
However, you can put an OBS= dataset option onto the input dataset...
Code:
proc sql;
  create table blah2 as
  select *
  from blah1(obs=10)
  ;
quit;

Is that what you're after?

Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top