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
What happens when we provide null key to sort, merge and pbks in Abinitio ?
What you can store, manage and reuse centrally in ab initio enterprise meta>environment (eme)?
How do you truncate a table?
What would be the next step after collecting the data?
How to process records in batches like 1-20 records in first execution and 21-40 records in second run.. so on
What do you understand by overflow errors?
Have you used the rollup component? Describe how?
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.
What kind of layouts does abinitio support?
What is the importance of eme in abinitio?
How to create a repository in abinitio for stand-alone system(local nt)?
Explain what is sandbox?
What is brodcasting and replicate?
What is the difference between dml expression and xfr expression?
What is a partition and what are the different types of partition components in abinitio?