Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calc totals w/i SQL SELECT
Message
From
13/06/1997 19:11:29
 
 
To
13/06/1997 17:21:05
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00036312
Message ID:
00036325
Views:
26
IIF should work. Can you post here the SELECT-SQL you are using?

Vlad

>I have a table that is structured as such.
>
>code (c)
>amount_in (n)
>amount_out (n)
>status (l)
>
>I'd like to get totals grouped by code and sum amount_in when status=.f. (if status=.t. don't sum amount_in value) and sum amount_out when status=.t. (if status=.f. don't sum amount_out value).
>
>I would also like to cnt the total number of amount_in and amount_out records using the same logic I used with sum.
>
>Can I use a WHILE or FOR with SUM() and CNT() within a SQL SELECT statement? The IIF command just won't give me the results I want.
>
>TIA for any help!
>
>/chris
Previous
Reply
Map
View

Click here to load this message in the networking platform