Freinds,
I am trying read some data and sum it up to an array. For example i have this dataset
ID - Code - Reason - Time of Occurence
---------------------------------
A - 123 - 1 - 10:00
A - 0 - 0 - 10:05
A - 125 - 2 - 10:06
A - 0 - 0 - 10:09
A - 123 - 1 - 10:10
A-0 -0-10:20
---------------
I wanted to accumulate time by Code data in an array by CODE and the CODE is not constant.
in the first iteration
123 - 5 minutes
125 - 4 minutes
123 - 10 minutes
My End data is 123 - 15 minutes and 125 - 4 minutes
I am not expecting Huge dataset for this comparision so if search is required we might be OK. i thought of using two dimensional array or a structure with all the elements but but am getting confused on how to search if the CODE already exists and accumulate to that value.
A little code snippet will be of a great help.
I am trying read some data and sum it up to an array. For example i have this dataset
ID - Code - Reason - Time of Occurence
---------------------------------
A - 123 - 1 - 10:00
A - 0 - 0 - 10:05
A - 125 - 2 - 10:06
A - 0 - 0 - 10:09
A - 123 - 1 - 10:10
A-0 -0-10:20
---------------
I wanted to accumulate time by Code data in an array by CODE and the CODE is not constant.
in the first iteration
123 - 5 minutes
125 - 4 minutes
123 - 10 minutes
My End data is 123 - 15 minutes and 125 - 4 minutes
I am not expecting Huge dataset for this comparision so if search is required we might be OK. i thought of using two dimensional array or a structure with all the elements but but am getting confused on how to search if the CODE already exists and accumulate to that value.
A little code snippet will be of a great help.