Re: SQL Problem

From: Michael Sallwasser <msallwas_at_world.nad.northrop.com>
Date: Tue, 2 Aug 1994 21:15:37 GMT
Message-ID: <CtxF21.116_at_gremlin.nrtc.northrop.com>


In article <316drf$24rr_at_postoffice.manassas.ibm.com> mlanda_at_vnet.ibm.com writes:
>
>Has anyone ever seen this error before? Any advice as to an alternate method
>without having to create temporary tables would be appreciated. Thanks.
>
>
>INSERT INTO ACTPROD_ALLOC_DEN
>SELECT C.SOURCE_ITEM,
> SUM((A.Q1*B.Y1*D.Y1)*((1+E.Y1Q1)/2),
> SUM((A.Q2*B.Y1*D.Y1)*((1+E.Y1Q2)/2),
> SUM((A.Q3*B.Y1*D.Y1)*((1+E.Y1Q3)/2),
> SUM((A.Q4*B.Y1*D.Y1)*((1+E.Y1Q4)/2)
>FROM THRUPUT A, ACTIVITY_DRIVERS B, ACT_PROD_METH C,
> MACHINE_HOURS D, DETAILYIELDS E,
>WHERE A.MENUPRODUCT=B.MENUPRODUCT AND
> B.MENUPRODUCT=C.MENUPRODUCT AND
> C.MENUPRODUCT=D.MENUPRODUCT AND
> D.MENUPRODUCT=E.MENUPRODUCT AND
> A.SECTOR=D.SECTOR AND
> D.SECTOR=E.SECTOR AND
> A.SECTOR=11 AND
> C.ALLOC_METH=B.DRIVER_TYPE AND
> B.DRIVER_TYPE='HR MHRS' AND
>GROUP BY C.SOURCE_ITEM;
>
>
> SUM((A.Q1*B.Y1*D.Y1)*((1+E.Y1Q1)/2),
> *
> error at line x:
> ORA-00935: group function is nested too deeply

I have never gotten that error, but I did notice that the parens in your SQL statement are unbalanced. I would not think that is the error, but ...

-- 
============================================================================
Michael Sallwasser  | Down one path is utter dispair and hopelessness. Down 
Northrop Grumman    | the other is total destruction. Let us choose wisely.
Received on Tue Aug 02 1994 - 23:15:37 CEST

Original text of this message