>Hi,
>
>I have a local view (lv_diario), buffering 5.
>
>And I got different results if I do,
>
>SELECT SUM(field) TO sfield FROM lv_diario INTO CURSOR query1
>
>(query1.sfield)
>
>and,
>
>SUM field TO sfield
>
>When I adding records to the view, everything is Ok, I get these results only modifying existent records and changing the "field" field.
>
>Any suggests? What I'm doing wrong?
Pablo,
I assume that SXELECT SUM()... gives you data from teh actual table on disk while SUM ... TO ... gshows you the pending changes in your buffer? Is this correct? If this is what you see it is because SELECT always reads the file on disk and does not use the buffered data that hasn't yet been saved. I guess that SUM ... TO ... is using the buffered ata in the work station.