I need to make one record to multiple records based on occurence column in the record and change the date.For example below first record has 5 ,so need to create 5 records from one and change the date to 5 months.Occurence can be any number.
I am unable to come with a script.Can some one help
Below is the input file
Id Name Date Occurence,Sal
1,ABC,Jan07,5,100
2,DEF,Dec06,14,600
Output File i Need is
Id,Name,Date,Occurence,Sal
1,ABC,Jan07,5,100/5
1,ABC,Feb07,5,100/5
1,ABC,Mar07,5,100/5
1,ABC,Apr07,5,100/5
1,ABC,May07,5,100/5
2,DEF,Dec06,14,600/14
2,DEF,Jan07,14,600/14
2,DEF,Feb07,14,600/14
2,DEF,Mar07,14,600/14
2,DEF,Apr07,14,600/14
2,DEF,May07,14,600/14
2,DEF,Jun07,14,600/14
2,DEF,Jul07,14,600/14
2,DEF,Aug07,14,600/14
2,DEF,sep07,14,600/14
2,DEF,Oct07,14,600/14
2,DEF,Nov07,14,600/14
2,DEF,Dec07,14,600/14
2,DEF,Jan08,14,600/14