Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT SUM() gives me # than SUM... TO
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00361638
Message ID:
00361648
Views:
28
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform