Input -
Name|city |startyear
Rahul |Mumbai|2010
Rahul|kolkata|2014
Rahul|Delhi|2018
Output should be-
Name|city |startyear|endyear
Rahul |Mumbai|2010|2014
Rahul|kolkata|2014|2018
Rahul|Delhi|2018|9999
Answer Posted / yash
We can use rollup to convert whole data in vector and later use vector data in normalize to assign last column.
rollup: use accumulation function on all columns
NORMALIZE:
length :: 3;
out::normalize(in,index)=
begin
out.name :: in.name[index];
out.city :: in.city[index];
out.startyear :: in.startyear[index];
out.endyear :: if(index==2) 9999 else in.startyear[index+1];
end;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What information does a .dbc file extension provides to connect to the database?
How to compare two dmls in abinitio
What are the steps to create a repository in ab initio?
Can sorting and storing be done through single software or you need different for these approaches?
What do you mean by a transaction file?
What is the purpose of having stored procedures in a database?
What is conduct>it?
Pdl with an example?
What is the ab initio business rules environment (bre)?
What is $mpjret?
Why do you think data processing is important?
Explain data flow graph with an example?
What is MAX CORE of a component?
What are the fundamental blocks of co> operating system of ab initio?
What are the operations that support avoiding duplicate record?