Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT SUM() gives me # than SUM... TO
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00361638
Message ID:
00361648
Vues:
26
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform