Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What information does a .dbc file extension provides to connect to the database?

1206


How to compare two dmls in abinitio

1823


What are the steps to create a repository in ab initio?

1236


Can sorting and storing be done through single software or you need different for these approaches?

1106


What do you mean by a transaction file?

1240


What is the purpose of having stored procedures in a database?

1133


What is conduct>it?

1098


Pdl with an example?

1084


What is the ab initio business rules environment (bre)?

1159


What is $mpjret?

1129


Why do you think data processing is important?

1099


Explain data flow graph with an example?

1114


What is MAX CORE of a component?

1302


What are the fundamental blocks of co> operating system of ab initio?

1257


What are the operations that support avoiding duplicate record?

1427