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
How scientific data processing is different from commercial data processing?
What are the functions of the replicate and dedup component?
What are the different types of partition components in abinitio?
What is is a data flow graph?
What do you understand by a cartesian join?
How to create a repository in abinitio for stand-alone system(local nt)?
What do you mean by a transaction file?
What does edp stand for?
What is ab initio enterprise meta>environment (eme)?
What dedup-component and replicate component does?
What is conduct>it?
what is the difference between i)public ii)private iii)common and client projects?
Mention what is abinitio?
What is the difference between partitioning with key / hash and round robin?
explain checkin and checkout?