Re: ORA-00937: not a single-group group function
Originally posted by Hakimca
Hi All,
I got the following errror when calling a function a select.
ERROR at line 1:
ORA-00937: not a single-group group function
ORA-06512: at "PUSER.USERQTOTALNOOFUSRS", line 8
ORA-06512: at line 1
SELECT COUNT(TUSER.UNIQUEID) - 2 AS COUNTOFUNIQUEID,
USERQTOTALNOOFUSRS_Function0(TORGANIZATION.ORGUNIQUEID) AS CountOfDecomm
FROM TUSER,TORGANIZATION
WHERE TUSER.ORGANIZATIONID = TORGANIZATION.ORGUNIQUEID
AND TORGANIZATION.ORGNAME = 'TENROX' ;
...............
What's wrong.
Thanks in advance
You are missing the group by clause.
Add GROUP BY USERQTOTALNOOFUSRS_Function0(TORGANIZATION.ORGUNIQUEID)
to the select statement.
Remember the Golden Rule - He who has the gold makes the rules!
===================
Kris109
Ph.D., OCP 8i, 9i, 10g, 11g DBA