hello all

I found a problem which I cannot find way to solve
I hope some body give a clue how to solve the problem

thank you
denny

the problem------
table1 has 2 fields

1.id int (primary key)
2.datastrings (varchar)

datastrings field has 3 rows

string1="-1,1,1,-1,1,1"
string2="1,1,-1,1,-1,-1";
string3="-1,-1,1,1,1,1"

how to fill another table2 ( which have same structure as table1)
so that the value in datastrings field in table2 is
added from the accumulated value from rows above it
so the value in table2 are

string1="-1,1,1,-1,1,1"
string2="0,2,0,0,0,0";
string3="-1,1,1,-1,1,1"

//-------------

INSERT INTO destTable
SELECT * FROM srcTable

this is the syntax, this is wat i remember, its been long since i have used sql, this works fine,
kindly have a check if the table is created already or not.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.