Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple problem, but can't think of it...
Message
From
26/11/2001 18:47:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/11/2001 18:42:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00586085
Message ID:
00586089
Views:
14
>>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!!
>
>select accountNo, sum(Amount) as 'Total' ;
>from mytable ;
>group by accountNo ;
>order by accountNo
>
>Cetin

To identify specific account(s) with a known sum :
select accountNo from myTable ;
 having sum(amount)=lnKnownTotal ;
 group by accounNo
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform