Question : Scan and update ...

select cust, count(*) as lines, start, end, 000000 as total_time ;
from table1 ;
group by  cust ;
into cursor cResult1 readwrite

I need to scan through each record for start date, start time, end date, and end time
store to lnStartDateTime and lnEndDatetime
do some math
update the cResult1 for total_time

what I am asking is the best approch for scanning through each record getting the vars, do the math and update the field(total_time from cResult1

Answer : Scan and update ...

Select cResult1
Scan
   lnStartDateTime = start
   lnEndDateTime = end
   * do math
   replace next 1 total_time with result IN cResult1
Endscan

and if the math isn't complicated or you put it in a procedure you can even do with the scan and initially compute total_time via:

select .... function(start,end) as total_time....

Bye, Olaf.
Random Solutions  
 
programming4us programming4us