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 / murali krishna udayagiri

Yes Vital is correct. This can be acheived using SCAN
component with only one variable.

1.Input_file
2.Sort with in group (dno asc,sal desc)
3.scan
###############################################
type temporary_type=record
integer(4) temp1;end;
temp :: initialize(in) =
begin
temp.temp1::0;
end;

out :: scan(temp, in) =
begin
out.temp1 :: temp.temp1 + 1;
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

Thanks,
Murali Udayagiri
Mail id: udayagiri.murali@gmail.com

Is This Answer Correct ?    3 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the primary keys and foreign keys?

1115


What do you understand by a cartesian join?

1105


What are the steps to create a repository in ab initio?

1238


What are the facts that can compromise data integrity?

1133


What are the fundamental blocks of co> operating system of ab initio?

1259


What a local lookup is?

1029


What are the different types of parallelism used in abinitio?

1094


Runtime behavior of Normalize and Reformat

2695


How can you export a component’s internal parameters ?

2381


What do you mean by data sorting?

1193


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

2208


What happens when we provide null key to sort, merge and pbks in Abinitio ?

1663


What are the six data process products of ab initio (architecture of ab initio)?

1104


What is a rollup component? Explain about it.

1172


What is the difference between a scan component and a rollup component?

1171