Link to home
Start Free TrialLog in
Avatar of JGH5
JGH5Flag for United States of America

asked on

Oracle Roll Up Syntax Error

I am trying to perform a Roll Up in Toad for Oracle to produce results like this:

BEACH_NAMES    BEACH_NAMES_CNT
- ----------
0        103
1         87
2         71
3         52
4         88
5        113
6        163
7        412
8        537
9        592
        2218

Using this Query:

SELECT SUBSTR(BEACH_NAMES,1,1) BEACH_NAMES, COUNT(*) BEACH_NAMES_CNT FROM  BEACH_SEC_INFO GROUP BY ROLLUP SUBSTR(BEACH_NAMES,1,1));

I am getting a syntax error, I spend most of my time in SQL Server.  I have access to multiple instances and perhaps I need to include DBO?
ASKER CERTIFIED SOLUTION
Avatar of MikeOM_DBA
MikeOM_DBA
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial