Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple problem, but can't think of it...
Message
 
 
To
26/11/2001 18:38:28
N. Lea
Nic Cross Enterprises
Valencia, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00586085
Message ID:
00586087
Views:
11
SELECT AccountNo, SUM(Total) AS Totals ;
  FROM mytable ;
  GROUP BY AccountNo ;
  ORDER BY AccountNo ;
  INTO CURSOR crsTotals
If you want to get only accounts with Totals > 1000.00
SELECT AccountNo, SUM(Total) AS Totals ;
  FROM mytable ;
  GROUP BY AccountNo ;
  HAVING Totals > 1000.00 ;
  ORDER BY AccountNo ;
  INTO CURSOR crsTotals
>i have a HUGE table with account numbers. I am trying to find a certain sum, but I do not know which account no it is linked to. I need to sum totals in batches. Can anyone help? For example:
>
>Account No Total
>111222
>111222
>111222
>123668
>123668
>123668
>123668
>569999
>569999
>569999
>569999
>569999
>569999
>
>I need to get the total of 111222 then 123668, etc... I have over 100000 records to go through. Can anyone help me?? THanks!!
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform