August 23, 2006 at 9:11 am
I need subtotals only for employee_name and offc, but I am forced to bring all the non-aggregates in the group by. I tried to trick it with max for employee_code and period, but I can't do the same for client_code and client_name because it skews my results.
So, how can I get subtotals for less columns than the ones that I am forced to bring into group by from select? Thanks
select
max(employee_code)
,employee_name
,offc
,client_code
,client_name
,max(period)
,sum(Billable) as Billable
August 24, 2006 at 8:03 am
You can create more complex logic in RS than one select statement. You can select the first group into a temp table with the correct aggregation and then join the temp table to the other detail table using the appropriate table keys.
Have you already tried using a flat detailed record set and grouping within the table control in RS? You may be able to hide the groups details and use built in RS functions on the detail rows.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply