Hi ,
create table test(id varchar2(10),
a number,
b number ,
c number );
insert into test (ID, A, B, C)
values ('row1', 0, 100, 20);
insert into test (ID, A, B, C)
values ('row2', 100, 200, 50);
insert into test (ID, A, B, C)
values ('total', 100, 100, 30);
insert into test (ID)
values ('cumulative');
update test
set (a,b,c)=(
select a+b+c ,b+c,c from test
where id= 'total')
where id= 'cumulative'
I need help whether I can rewrite the update statement for row 'cumulative' in my table in some another way, as I have many columns in original table
logic for cumulative row is , it is running total in a row.
Thanks