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 ? | 2 Yes | 1 No |
Post New Answer View All Answers
Describe in detail about lookup?
How to add default rules in transformer?
Describe what the SQL Server tempdb and tlog files are used for?
What do you understand by local lookup?
What dedup-component and replicate component does?
Mention what information does a .dbc file extension provides to connect to the database?
What do you mean by a transaction file and how it is different from that of a sort file?
How transaction file different from that of a sort file?
what is the difference between i)public ii)private iii)common and client projects?
What is the difference between sandbox and EME?
How abinitio eme is segregated?
How to run a graph infinitely?
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 is the role of co-operating system in abinitio?
What is a deadlock and how it occurs?