G
Guest
Hi all,
I have a dataTable that contains nearly 38400 rows.
In the dataTable consist of 3 column.
column 1 Name: MUHNO
column 2 Name: HESNO
Column 3 Name: BALANCE
Let me give you some example first:
++++++++++++++++++++++++++++++++++++++++
MUHNO HESNO BALANCE
----------------------------------------------------------------
0111621000 7371626 0
0911621000 7371626 -250
0911621100 7371626 -25
0914021000 7371626 0
++++++++++++++++++++++++++++++++++++++++
Now in my DataTable I have 16000 distinct HESNO
and total rows is 38400.
What I want is I have to use the HESNO to get all
the rows as in shown above and count the balance
that has MUHNO starting 09??????? and add into the row
that has 0111621000 and delete the rest of the
3 rows that their HESNO is same but their MUHNO
that stsrts with 09????????.
So I have to count for below 3 rows balance:
MUHNO HESNO BALANCE
----------------------------------------------
0911621000 7371626 -250
0911621100 7371626 -25
0914021000 7371626 0
which is -275 and in to the row balance column:
I guess I have to replace the value of the
BALANCE column for the row:
MUHNO HESNO BALANCE
---------------------------------------------
0111621000 7371626 0
What I did is that I run 38400 rows and I put all the HESNO
into array. Then I remove duplicated value in the array
and I sort the array.
Now I have to create a for loop for array
to check in dataTable and use replace/remove operation
that I decsribe above. But Unfortunatly I am stuck in
here.
Simply the operation have to be like in below:
Before
MUHNO HESNO BALANCE
--------------------------------------------
0111621000 7371626 0
After
MUHNO HESNO BALANCE
---------------------------------------
0111621000 7371626 -275
and delete the rows:
MUHNO HESNO BALANCE
---------------------------------------
0911621000 7371626 -250
0911621100 7371626 -25
0914021000 7371626 0.
Can anyone out there to tell me easy way to achive this
in fatsest way?
I thank you all for your kind understanding to reading my post.
Rgds,
Niyazi
I have a dataTable that contains nearly 38400 rows.
In the dataTable consist of 3 column.
column 1 Name: MUHNO
column 2 Name: HESNO
Column 3 Name: BALANCE
Let me give you some example first:
++++++++++++++++++++++++++++++++++++++++
MUHNO HESNO BALANCE
----------------------------------------------------------------
0111621000 7371626 0
0911621000 7371626 -250
0911621100 7371626 -25
0914021000 7371626 0
++++++++++++++++++++++++++++++++++++++++
Now in my DataTable I have 16000 distinct HESNO
and total rows is 38400.
What I want is I have to use the HESNO to get all
the rows as in shown above and count the balance
that has MUHNO starting 09??????? and add into the row
that has 0111621000 and delete the rest of the
3 rows that their HESNO is same but their MUHNO
that stsrts with 09????????.
So I have to count for below 3 rows balance:
MUHNO HESNO BALANCE
----------------------------------------------
0911621000 7371626 -250
0911621100 7371626 -25
0914021000 7371626 0
which is -275 and in to the row balance column:
I guess I have to replace the value of the
BALANCE column for the row:
MUHNO HESNO BALANCE
---------------------------------------------
0111621000 7371626 0
What I did is that I run 38400 rows and I put all the HESNO
into array. Then I remove duplicated value in the array
and I sort the array.
Now I have to create a for loop for array
to check in dataTable and use replace/remove operation
that I decsribe above. But Unfortunatly I am stuck in
here.
Simply the operation have to be like in below:
Before
MUHNO HESNO BALANCE
--------------------------------------------
0111621000 7371626 0
After
MUHNO HESNO BALANCE
---------------------------------------
0111621000 7371626 -275
and delete the rows:
MUHNO HESNO BALANCE
---------------------------------------
0911621000 7371626 -250
0911621100 7371626 -25
0914021000 7371626 0.
Can anyone out there to tell me easy way to achive this
in fatsest way?
I thank you all for your kind understanding to reading my post.
Rgds,
Niyazi