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 the process steps you would perform when defragmenting a data table. This table contains mission critical data?

845


What do you understand by overflow errors?

865


What would be the next step after collecting the data?

931


What are the functions of the replicate and dedup component?

813


Given input file with single column having 1 2 2 4 3 .. Required output 1 2 2 4 4 4 4 3 3 3.. How?

738


What is MAX CORE of a component?

939


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

887


What do you know about abinitio?

968


When running a stored procedure definition script how would you guarantee the definition could be rolled back in the event of problems?

852


Explain what is the architecture of abinitio?

904


What is the difference between dml expression and xfr expression?

836


can any one help me now i am learning AB Inito but i don't have material and pdf's can any one provide pdf's to this mail id mohanraju0113@gmail.com thanks in advance...................................

2001


Explain how abinitio eme is segregated?

1177


What is the core of co> operating system?

825


Explain what is sandbox?

812