Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / nandu

proc sort data=samp nodupkeys;
by sal descending ;
run;
data samp1 samp2;
set samp ;
ln+1 ;
if ln=2 then output samp2 ;
else samp ;
run;
/*second highest salary obs will come into samp2 dataset */

Is This Answer Correct ?    3 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between input and infile statement?

1178


Do you need to know if there are any missing values?

1044


name several ways to achieve efficiency in your program? : Sas programming

1080


Mention what is the difference between nodupkey and nodup options?

1025


Define run-group processing?

1047


what is intially documentation in sas?

5057


What are the implications?

1720


Difference between sum function and using “+” operator?

1164


What do you know about symput and symget?

1260


What are the table names in oracle database...?

2760


Explain how merging helps to combine data sets.

1059


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

1070


what is ae onset date n what is RDS

2582


why is sas considered self-documenting? : Sas programming

1152


What are the automatic variables for macro? : sas-macro

1261