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 / ravi

we can do this with scan comp
exp::i/p folloed by sort folloed by scan and o/p
ip record
id,dept_name,sal
in sort keep key fields as (dept_name,sal descending)
 now in scan write this T/f in parametres

type temporary_type
record
decimal("")secno;
end;
temp::initialize(in)=
begin
temt.secno::0;
end;
temp::scan(temp,in)=
out::finalize(temp,in)=
begin
out.in::in.id;
out.ddept_name::in.dept_name;
out.secno::temp.secno;
out.sal::in.sal;
end;
out::out_select(out)=
begin
out::out.secno==2
end;

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the facts that can compromise data integrity?

1156


Can sorting and storing be done through single software or you need different for these approaches?

1129


What are differences between different gde versions(1.10,1.11,1.12,1.13and 1.15)?

1105


Explain about ab initio’s dependency analysis?

1179


what is the difference between i)public ii)private iii)common and client projects?

2246


difference between paramaters inputparameters,Local parameters, Formal parameters, Sand box parameters,Project parameters and export parameter?

2843


How to compare two dmls in abinitio

1845


What is the architecture of abinitio?

1107


how to insert/update a csv file by comparing it with another csv file?

2579


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

1689


What are the different types of parallelism used in abinitio?

1118


How to find the project(pub,priv,common,client) in between public, Private,common?Any identification?

2120


Explain what is sandbox?

1099


How would you find out whether a sql query is using the indices you expect?

1082


Explain how abinitio eme is segregated?

1515