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 can you find the 2nd Highest salary in a file department wise in abinitio?

Answer Posted / raje0303

Hi Murali,

This logic is correct only will fail when highest salary entries are more than one (e.g. two people has highest and equal salary )
we need to updated scan function as below -

type temporary_type=record
integer(4) temp1;
integer(4) last_sal;
end;

temp :: initialize(in) =
begin
temp.temp1::0;
temp.last_sal::0;
end;



out :: scan(temp, in) =
begin
if(last_sal != in.salary)
begin
out.temp1 :: temp.temp1 + 1;
end;
last_sal = in.salay;
end

out :: finalize(temp, in) =
begin
out.sal:: in.sal;
out.dno :: in.dno;
out.temp1 :: temp.temp1;
end;
out :: output_select(out) =
begin
out::out.temp1 == 2;
end;
###############################################
4.Output_file

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain batch processing in ab initio?

1431


What a local lookup is?

1028


What are the differences between different versions of co-op?

996


Describe the evaluation of parameters order in ab initio?

1514


Difference between informatica vs ab initio?

1293


Runtime behavior of Normalize and Reformat

2692


What dedup-component and replicate component does?

1258


Mention what the difference between “look-up” file and “look is up” in abinitio?

1303


Define ramp limit in ab initio?

1264


What is the difference between check point and phase?

1292


What is the difference between partitioning with key / hash and round robin?

1358


What are the components new in 2.14 compared to 1.8 and State the usage of the components?

2207


What are the functions of the replicate and dedup component?

1080


Code check-in and check-out commands in AbInitio

4302


What is the architecture of abinitio?

1090