Solved

Error ora-00935 ?

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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.

759 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

21 Experts available now in Live!

Get 1:1 Help Now