0

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"

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

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by arunkumars
0
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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.