Katarina2016
Programmer
Hello, I am working on FoxPro 2.6 for DOS system. How can I get to add column (summ)? How can I get it to start at each item change?
E.g.
ID...quantity...summ
=============================
650.....50........50
650....100.......150
650.....80.......230
650....500.......730
115.....70........70
115.....20........90
115....150.......240
115.....60.......300
115....430.......730
Code:
close all
delete file("x.dbf")
select ID,quantity,round(00000.0,2) as summ from data;
into table x
total = 0
scan
total = total + quantity
replace summ with total
endscan
Thanx in advance,
Cathy
E.g.
ID...quantity...summ
=============================
650.....50........50
650....100.......150
650.....80.......230
650....500.......730
115.....70........70
115.....20........90
115....150.......240
115.....60.......300
115....430.......730
Code:
close all
delete file("x.dbf")
select ID,quantity,round(00000.0,2) as summ from data;
into table x
total = 0
scan
total = total + quantity
replace summ with total
endscan
Thanx in advance,
Cathy