 WITH Mytable1 DO
     BEGIN
       tmp1:=0; tmp2:=0;
       first;
       while not EOF do
        BEGIN
         edit;
         Fields[2].Value:=fields[1].Value - tmp1;
         Fields[3].Value:=Fields[2].value - tmp2;
         tmp1:=fields[1].Value;
         tmp2:=Fields[2].Value;
         next;
       END;
     END;