467,911 Members | 1,553 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,911 developers. It's quick & easy.

Oracle - Rollup not working when I use Having clause

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.
May 25 '07 #1
  • viewed: 3210
Share:
1 Reply
frozenmist
Expert 100+
Hi,
Welcome to TSDN. I am sure you will find the forums here informational.
I am moving your question from articles section to forums. Please don't post any questions as thread in articles.

MODERATOR
May 25 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by sajid | last post: by
7 posts views Thread by vnl | last post: by
125 posts views Thread by Rhino | last post: by
2 posts views Thread by Burt | last post: by
2 posts views Thread by egoldthwait | last post: by
3 posts views Thread by apattin | last post: by
11 posts views Thread by lenygold via DBMonster.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.