how to get second highest salary from a employee table and
how get a 5th highest salary from a employee table?

Answer Posted / vijay

proc sort data=samp out= samp1 nodupkeys;
by sal descending _all_;
run;

/*second highest salary obs will come into samp2 dataset */
/*for fifth highest salary obs change slice value from 2 to 5 */

data samp2;
slice = 2;
set samp1 point = slice;
output;
stop;
run;

Is This Answer Correct ?    1 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between where and if statement?

613


What is the use of function Proc summary?

648


What is the role of administrative users? : sas-grid-administration

653


Describe the ways in which you can create macro variables? : sas-macro

574


How sas treats the dsd delimiters?

715






Mention what are the data types does SAS contain?

694


Which statement does not perform automatic conversions in comparisons?

1200


How would you identify a macro variable? : sas-macro

528


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

648


What is the sas data set? : sas-grid-administration

564


how does sas handle missing values in sort order? : Sas programming

524


how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?

2287


How is character variable converted into numeric variable and vice versa?

588


Name types of category in which SAS Informats are placed?

730


Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya

1343