Please find the code below.
SELECT
COMPANY.NAME,
COUNT(ITEM.ID)
FROM
ITEM,
COMPANY
WHERE ITEM.COMPANYID = COMPANY.ID
GROUP BY ROLLUP(COMPANY.NAME)
HAVING COMPANY.NAME NOT LIKE 'RESEAR%'
AND COMPANY.NAME NOT LIKE 'LOOK%'
ORDER BY COMPANY.NAME ASC;
when I use the having clause the rollup does not show the sub total. Actually I use the rollup to show the subtotals. Why is not displayed when I use having clause? Is there any other way to get around the problem?
Thanks in advance.