While working on a programming in (Basic Language) which we use for translating our customers data into ERP system, I came across an issue where I need to write the data to SQL. I am done with that but here is the problem.
There is possibility that customer sends same part in different lines and I want to catch that instance of same part and write the occurrence of how many times the part is coming.
Since there is a lot of limitation in basic programming language I am not able to catch the instances of how many times
the part shows up or may be i dont know advance basic programming (since i am a novice). However the software allows use of Java programming inside basic programming.
I wanted to know how to implement the solution for the above problem in Java.
I have defined an array in Basic of n rows and 14 columns. These 14 columns refer to 14 columns
of SQL table. The array is given below to be specific.
One of the columns (column 7) is a counter which counts for the repetition of the occurrence of same part.
so for example in the above scenario
For Example: The Array will have.
Line PartNo other col Counter
Line1 PartA …. 1
Line2 PartB …. 1
Line14 PartC …. 1
Line9 PartA …. 2 (repeated second time so 2)
Line5 PartD … 1
Line70 PartB …. 2 (repeated second time so 2)
Line90 PartA …. 3 (repeated second time so 3)
Hope I was able to explain the problem. My ask is to how to capture the repeated occurrences and write the n number of occurrences into Column named counter.
Please note that the Line Column is not in serial order.
Thanks for your help.