Solved

Error ora-00935 ?

Posted on 2001-06-14
3
924 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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 configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

862 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now