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 |
In SAS explain which statement does not perform automatic conversions in comparisons?
what is washout period?
State the difference between INFORMAT and FORMAT ?
What is program data vector (pdv) and what are its functions?
Hi, I have one dataset, could you please ans for this. id amount paid_amount 1 700 400 2 900 250 3 300 300 a 400 250 b 500 320 c 800 650 x 200 190 y 900 250 z 300 180 i want create new dataset having id and paid_amount who are paid high amount comparing amount. ex: 1d paid_amount 3 300 c 650 x 190
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?
What is the difference between %put and symbolgen? : sas-macro
why only we use SAS? their r many programmin language like SPSS, Oracle... Why SAS?
Explain what is SAS informats?
What is the difference between an informat and a format? Name three informats or formats.
Does anybody have SAS Training manual or documentation or can you refer me any book to have better understanding on SAS. I am fresher to SAS tool. (Ready to pay)
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming