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

Describe in detail about lookup?

1033


How to add default rules in transformer?

1156


Describe what the SQL Server tempdb and tlog files are used for?

2274


What do you understand by local lookup?

1091


What dedup-component and replicate component does?

1219


Mention what information does a .dbc file extension provides to connect to the database?

1243


What do you mean by a transaction file and how it is different from that of a sort file?

996


How transaction file different from that of a sort file?

1352


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

2161


What is the difference between sandbox and EME?

1205


How abinitio eme is segregated?

1228


How to run a graph infinitely?

1067


What is the return type of lookup_not_loaded() ? Does it return 0 or 1 to signify true or false or does it return index ...can someone please explain.

1303


What is the role of co-operating system in abinitio?

1380


What is a deadlock and how it occurs?

1109