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 ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What kind of layouts does abinitio support?

637


What exactly do you know about the typical data analysis?

605


What is the role of co-operating system in abinitio?

882


What are the benefits of data analyzing?

681


What is the architecture of abinitio?

674






Explain the methods to improve performance of a graph?

679


explain checkin and checkout?

671


Have you ever encountered an error called “depth not equal”?

657


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

627


What are the differences between informatica and abinitio?

725


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

670


Can anyone give me an example of realtime start script in the graph?

687


What is a partition?

720


How to compare two dmls in abinitio

1205


Give one reason when you need to consider multiple data processing?

636