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?
Answers were Sorted based on User's Feedback
Answer / limnesh
Proc Sql;
Select *,monotonic ()as c from <datasetname>
group by a having c in (100,150,180,190);
quit;
| Is This Answer Correct ? | 20 Yes | 5 No |
Answer / limnesh dominic
Before saying answer is not correct, please try this
Data f;
do i=1 to 200;
output;
end;
run;
Proc Sql;
Select *,monotonic ()as c from f
group by i having c in (100,150,180,190);
quit;
Proc print;
run;
| Is This Answer Correct ? | 15 Yes | 0 No |
Answer / 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 |
Answer / pranoy tikadar
PROC SQL;
SELECT*,
MONOTONIC() AS COUNT
FROM TEST
HAVING COUNT IN(100,150,180,190);
QUIT;
| Is This Answer Correct ? | 11 Yes | 3 No |
Answer / vipin choudhary
Proc Sql;
Select * from <dataset name>
where _n_ in (100,150,180,190);
quit;
| Is This Answer Correct ? | 12 Yes | 29 No |
where are dashboard components are created and maintained? : Sas-bi
tell me about use of arrays in sas
What is LAG function?How is it used? can any one explain
3 Answers TRE, Verinon Technology Solutions,
WHAT IS LAG FUNCTION ? WHERE CAN YOU IMPLEMENT THIS FUNCTION?
i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable?
What do you know about sas and what we do? : sas-grid-administration
what are different type of sas servers ? On which server does the sas code execute ?
what are the best practices to process the large data sets in sas programming? : Sas-administrator
how to extract data from SAP servers? Is like oracle servers or any other methods to extract please reply me.
What is connection profile? : sas-grid-administration
What is _n_?