Base SAS

Reply
Occasional Learner
Posts: 1

Base SAS

Hi,

 

How to select observation between 10 to 20 using proc sql?

 

Trusted Advisor
Posts: 1,203

Re: Base SAS

Please provide a sample data set.

Super User
Posts: 1,110

Re: Base SAS

Please try firstobs and obs options

 

here sas applies the formula

 

(obs - firstobs) + 1 = resulting obs number

 

proc sql;
create table test as select * from sashelp.class(firstobs=10 obs=20);
quit;

Thanks,

Jag

 

 

 

Thanks,
Jag
Esteemed Advisor
Posts: 5,198

Re: Base SAS

Even if the solution provided by https://communities.sas.com/t5/user/viewprofilepage/user-id/12151 is feasible, SQL is not by nature a row oriented language. The data step is.

Why SQL? What is the underlying requirement?

Data never sleeps
Ask a Question
Discussion stats
  • 3 replies
  • 234 views
  • 1 like
  • 4 in conversation