We help IT Professionals succeed at work.

DATATABLE

b001
b001 asked
on
Hi Experts
I have dtc1 and dtc2 quite large datatables.
dtc1 has  icode,total columns
dtc2 has icode,jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec,year   columns.
I would like to sum jan,feb,mar for year=2011 and oct,nov,dec for year =2010  columns from dtc2  and then update dtc1 column total with it.
Icode is the common column in both datatables.
dtc1  data    MPR125,0
                    CPR200,0

dtc2 data     MPR125,0,1,0,2,0,2,1,3,2,1,2,0,2011
                    MPR125,0,0,2,0,0,1,1,2,0,1,4,0,2010
                    CPR200,0,1,0,2,0,1,1,3,2,1,2,0,2011
                    CPR200,1,1,1,3,0,2,1,1,2,1,1,0,2010

please write the code for me.
Please help.
Thanks
Comment
Watch Question

Most Valuable Expert 2012
Top Expert 2014

Commented:
>please write the code for me.

You mean example code right?

Author

Commented:
yes please

Author

Commented:
Hi CodeCruiser:
Please reply to my request
Most Valuable Expert 2012
Top Expert 2014
Commented:

Author

Commented:
whatever is the easiest will do.