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


Please Help Members By Posting Answers For Below Questions

What are the reasons for which business can trust the approach of data processing?

718


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

859


Input A 100 NUll A NUll 200 B 100 Null B Null 300 Output A 100 200 B 100 300 Do this using Ab initio

1104


What do you mean by the term data warehousing? Is it different from data mining?

787


How data is processed and what are the fundamentals of this approach?

746






Mention how can you connect eme to abinitio server?

992


what is the output when -1 is put in select_expr of FBE?

1059


What is data mapping and data modelling?

1082


How to create repository in abinitio for stand alone system(local nt)?

830


How to convert a single column values 1 2 3 4 to single row of 4 columns ? And vice-versa

758


Why creation of temporary files depends on the value of MAX CORE ? How to use in abinitio graph? 10. What is the diff between abinitiorc and .abinitiorc files ? How to use in abinitio graph? 11. What is the use of allocate()? How to use in abinitio graph? 12. What is use of branch in EME ? 13. How you can break a lock in EME ? How can you lock a file so that only no one other than EME admin can break it ? How to use in abinitio graph? 14. When you should be using ablocal() ? How you can use ablocal_expr? How to use in abinitio graph? 15. Why you should not keep the layout as 'default' for input table component ? How to use in abinitio graph? 16. What is dynamic lookup ? How to use in abinitio graph? 17. What is dependent parameter ? How to use in abinitio graph? 18. What is BRE ? (Business Rule Environment - This is a recent addition in abinitio package) How to use in abinitio graph? 19.What is output index ? How to use in abinitio graph? 20. How you can track the records those are not getting selected from ‘select’ in reformat component ? How to use in abinitio graph? 21. Can we have more than one launcher process for a particular graph ? How about agent ? How to use in abinitio graph? 22. There are lot of new fuctions added in 2.15 , you can ask about them ? How to use in abinitio graph? 23. How can you run multiple instances of a graph in parallel? How to use

3654


Within a cursor, how would you update fields on the row just fetched?

728


What are the features of ab initio?

727


How to create a repository in abinitio for stand-alone system(local nt)?

739


How do you add default rules in the transformer?

781