Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SQL Help

SQL Help

From: Paul Davies <cobalt_at_dircon.co.uk>
Date: Thu, 6 May 1999 18:11:15 +0100
Message-ID: <3731cd0f@newsread3.dircon.co.uk>


I have the following query:

        BEGIN
        select
                sum(
                        (M_N + M_B + (K_N* cd) + (C_B * cd))
                        * (7 / cnt)
                )
                into
                sold

                from A_REQ o, CAM c,(select CAM_ID,count(*) cnt from
CAM_DAY) CAM_DAY
                where
                c.CAM_ID = CAM_DAY.CAM_ID (+)
                and .........

*
When I run the query I get this error:

ERROR at line 1:

ORA-00937: not a single-group group function
ORA-06512: at "SYSTEM.GETSOLD", line 25
ORA-06512: at line 1

caused by the subquery (select CAM_ID, count(*) cnt from CAM_DAY)

I've also seen this error when I use other aggregate functions like sum(). I'm new to Oracle and would appreciated it if someone could enlighten me as to what it means and how I can stop it.

Thanks

Paul Received on Thu May 06 1999 - 12:11:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US