GAURAVGUPTA9
6th June 2003, 12:51
hi all
i want to sum a filed having depth 7 (in table tphrs100 field nhrs) how can i calculate the sum of this field for all the records....
this very urgent how to do that....please help.....
Regds
Gaurav

NvanBeest
6th June 2003, 13:10
You will have to use something like the following:


double tothrs
long i

tothrs = 0.0

select tphrs100.nhrs
where tphrs100._index1={...}
selectdo
for i = 1 to 7
tothrs = tothrs + tphrs100.nhrs[i]
endfor
endselect


Regards,
Nico