Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fastest way for sum records
Message
 
 
To
07/12/2008 02:15:19
Reza Meamar
Homa Programming Group
Shiraz, Iran
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:
01365837
Views:
8
>Hi all,
>I have a table with at least 200000 records in it.
>IdField and Payment are its fields.
>What is the fastest way to getting sum of payment for some records?
>Is SUM command suitable for this?
>SUM Payment ALL FOR IdField=2134 TO SumPayment
select sum(Payments) as TotalPayments from myTable where IDField = 2134 into cursor c_TotalPayments

?  nvl(c_TotalPayments.TotalPayments,0)
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform