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
Mention some ways for improving performance of a graph?
We know rollup component in abinitio is used to summarize a group of data record then why do we use aggregation?
Explain PDL with an example?
What are the different types of partition components in abinitio?
Within a cursor, how would you update fields on the row just fetched?
What is local and formal parameter?
Describe the evaluation of parameters order in ab initio?
List out the file extensions used in abinitio?
To which project that prefix will set is to private project or public project or both?how and where to set?
How to move or copy the project parameter or project object to my sandbox?
What are the functions of the replicate and dedup component?
What do you understand by local lookup?
What is flow buffering ? How it reduces the chances of having deadlock ? How to use in abinitio graph?
What are the co> operating system’s assorted library of integrated components?
What is the core of co> operating system?