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
What are the facts that can compromise data integrity?
Can sorting and storing be done through single software or you need different for these approaches?
What are differences between different gde versions(1.10,1.11,1.12,1.13and 1.15)?
Explain about ab initio’s dependency analysis?
what is the difference between i)public ii)private iii)common and client projects?
difference between paramaters inputparameters,Local parameters, Formal parameters, Sand box parameters,Project parameters and export parameter?
How to compare two dmls in abinitio
What is the architecture of abinitio?
how to insert/update a csv file by comparing it with another csv file?
What happens when we provide null key to sort, merge and pbks in Abinitio ?
What are the different types of parallelism used in abinitio?
How to find the project(pub,priv,common,client) in between public, Private,common?Any identification?
Explain what is sandbox?
How would you find out whether a sql query is using the indices you expect?
Explain how abinitio eme is segregated?