Hello,
I am trying to figure out how that summary option is working but despite all my tests I still don't get it.
When using that option, it always removes all intermediate summary lines without taking into account the fact that summary level has only one row or not.
Here is an example where I'd like to remove summary line in case only one row exists for an action (header of 2nd level):
SELECT 'dbr.hdr', 1; -- Partner is first header
SELECT 'dbr.hdr', 2; -- Action is second header
SELECT 'dbr.sum', 4,5,6,7,8,9;
SELECT 'dbr.summary.options', 'skip_single_line_summary';
SELECT 'dbr.summarytxt', 1, 'TOTAL';
SELECT
Partner,
Action,
Origin,
SUM(TotTransPrev) AS '#Trans N-1',
SUM(TotTrans) AS '#Trans N',
SUM(TotTrans-TotTransPrev) AS 'Delta Trans',
SUM(TotPtsPrev) AS '#Pts N-1',
SUM(TotPts) AS '#Pts N',
SUM(TotPts-TotPtsPrev) AS 'Delta Pts'
FROM Test
GROUP BY Partner ASC, Action ASC, Origin ASC
;
Thanks for your help.
Regards,
-Nicolas