There are 200 observations in a dataset, i want to pull out
the observation no's 100, 150,180,190 by using Proc SQL? How
you can get it?

Answer Posted / jim

* Setup test data;
data test;
do i=1 to 200;
j=ranuni(i);
output;
end;
run;

Proc Sql;
Select *,monotonic ()as c from test
having c in (100,150,180,190);
quit;

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are all the problems you faced while validating tables and reports?

3016


what is the primary data source for the wrs? : Sas-bi

661


What are the difference between sas functions and procedures?

645


What do you know about sas and what we do? : sas-grid-administration

608


how can you put a "trace" in your program? : Sas programming

581






What is the basic syntax style in SAS?

621


How to create a permanent sas data set?

680


what is sas business intelligence? : Sas-bi

594


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?

643


Which function is used to count the number of intervals between two sas dates?

576


how to read the variables in sas? : Sas-administrator

556


What is the general format of function in sas? : sas-grid-administration

573


How substr function works in sas?

705


What are the scrubbing procedures in sas?

581


How do you control the number of observations and/or variables read or written?

753