Solved

Error ora-00935 ?

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
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 explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

726 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