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 is the function you would use to transfer a string into a decimal?

1219


What is a local lookup?

1221


What is ab initio enterprise meta>environment (eme)?

1541


How do you truncate a table?

1174


Describe how you would ensure that database object definitions (tables, indices, constraints, triggers, users, logins, connection options, and server options etc)are consistent and repeatable between multiple database instances (i.e.: A test and production copy of a database)?

1153


What is a partition?

1166


What information is provided by .dbc file extension for connecting to the database?

1170


What is flow buffering ? How it reduces the chances of having deadlock ? How to use in abinitio graph?

3458


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

1258


What is the ab initio business rules environment (bre)?

1173


Code check-in and check-out commands in AbInitio

4315


What is the difference between look-up file and look-up, with a relevant example?

1199


Mention what is a partition and what are the different types of partition components in abinitio?

1180


What is data encoding?

1262


Have you ever encountered an error called “depth not equal”?

1165