Hi Gunjan,
I used == & not assignment operator in real code :-) :-).
The issue is not in if , else if nested statement in for but in the myTableInsertMethod() where some logic has to be there so that
It creates new row for all cat1, cat2 & cat 3 values while reading from CSV file.
For example when it reads i = 11, go to first if condition & calls this.mytabbleinstertMethod();
//reads value like this which works fine for i = 11
mytable.coll11 = conpeek(_record,11); //Cat1
mytable.coll12 = conpeek(_record,12); //Cat1
mytable.coll13 = conpeek(_record,37); //Cat2
mytable.coll14 = conpeek(_record,38); //Cat2
mytable15 = conpeek(_record,105); //Cat3
//Should skip i = 12 as we have already read that in mytable.coll12 above & go to i =13
mytable.coll11 = should change from conpeek(_record,11); TO conpeek(_record,13) //CAT1
mytable.coll12 = should change from conpeek(_record,12); TO conpeek(_record,14) //CAT1
mytable.coll13 = should change from conpeek(_record,37) TO conpeek(_record,39); //CAT2
mytable.coll14 = should change from conpeek(_record,38) TO conpeek(_record,40) //CAT2
mytable15 = should change from conpeek(_record,105) TO conpeek(_record,106; //CAT3
and so on for all CAT1, CAT2& CAT3 .
I hope this helps in understanding the issue, please suggest a fix for this.
Thanks
Mav