Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fastest way for sum records
Message
 
 
To
07/12/2008 13:20:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01365809
Message ID:
01365858
Views:
11
>If there's an index on IdField, the following may be faster
>
>local SumPayment, IdToDo
>SumPayment = 0
>IdToDo = 2134
>
>&& set order to the index on IdField
>&& best set talk Off
>
>if( seek(m.IdToDo, 'AliasName') )
>    sum Payment rest while (IdField == m.IdToDo) to SumPayment
>endif
>
>
Yes, it may be faster.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform