Solved

Error ora-00935 ?

Posted on 2001-06-14
3
943 Views
Last Modified: 2009-12-16
I have a problem with my SQL,

here it is....

SELECT COUNT(DECODE(IDTRIAGE,'N1','N1'),
 COUNT(DECODE(IDTRIAGE,'N2','N2'),
 COUNT(DECODE(IDTRIAGE,'N3','N3'),
 COUNT(DECODE(IDTRIAGE,'N4','N4'),
 COUNT(DECODE(IDTRIAGE,'N5','N5')
 FROM TBLVISITE WHERE IDHOPITAL = 'H1';

when I run it....it gives me this error

ORA-00935: group function is nested too deeply

why ?
0
Comment
Question by:Peewee20
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:renuraj
ID: 6191328
SELECT COUNT(DECODE(IDTRIAGE,'N1','N1')),
COUNT(DECODE(IDTRIAGE,'N2','N2')),
COUNT(DECODE(IDTRIAGE,'N3','N3')),
COUNT(DECODE(IDTRIAGE,'N4','N4')),
COUNT(DECODE(IDTRIAGE,'N5','N5'))
FROM TBLVISITE WHERE IDHOPITAL = 'H1'

Is it the one u'r expecting.  If not please specify what output u want to get.
You have missed right paranthesis on no of ocassions.

Regards,
0
 
LVL 1

Expert Comment

by:rmyufa
ID: 6191457
Hi!

ORA-00935 group function is nested too deeply

       Cause: This is an internal error message not usually issued.

        Action: Contact Oracle Customer Support.

This is from ORA Errors Book!

Regards,
pm
0
 
LVL 9

Accepted Solution

by:
konektor earned 75 total points
ID: 6191716
do u want to count how much rows are in TBLVISITE
where IDHOPITAL = 'H1' and IDTRIAGE = 'N1'
where IDHOPITAL = 'H1' and IDTRIAGE = 'N2'
... ?

do :
select
  sum(decode(IDTRIAGE,'N1',1,0)),
  sum(decode(IDTRIAGE,'N2',1,0)),
  ...
from TBLVISITE
where IDHOPITAL = 'H1'
m.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to recover a database from a user managed backup

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question