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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only