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 -> Still having problems with report

Still having problems with report

From: Oliver White <ojw_at_iinet.net.au>
Date: Tue, 27 Oct 1998 08:29:45 GMT
Message-ID: <363583fd.17982719@news.m.iinet.net.au>


Having made the changes sugested I now get this error:

(SUM(S.CONC_SEATS_SOLD) * S.CONC_PRICE) CONC_TAKINGS,

                                 *

ERROR at line 2:
ORA-00979: not a GROUP BY expression

This is the new code FYI

SELECT S.FILM_NO, FH.HIRE_PRICE,
(SUM(S.CONC_SEATS_SOLD) * S.CONC_PRICE) CONC_TAKINGS,
(SUM(S.ORD_SEATS_SOLD) * S.ORD_PRICE) ORD_TAKINGS,
(SUM(S.CONC_SEATS_SOLD) * S.CONC_PRICE
     + SUM(S.ORD_SEATS_SOLD) * S.ORD_PRICE) TOT_TAKINGS FROM FILM_HIRE FH, SCREENING S, FILM F, CINEMA C WHERE S.FILM_NO = (SELECT FILM_NO

                   FROM FILM
                   WHERE FILM_NAME = '&&F_NAME') AND
      S.CINEMA_CODE = (SELECT CINEMA_CODE
                       FROM CINEMA
                       WHERE CINEMA_NAME = '&&C_NAME') AND
      S.FILM_NO = FH.FILM_NO AND
      S.CINEMA_CODE = FH.CINEMA_CODE AND
      S.HIRE_START = FH.HIRE_START

GROUP BY S.FILM_NO, FH.HIRE_PRICE; I'm not sure what is going wrong here.
--
On the smeeter.
MHM 22x9
-- Received on Tue Oct 27 1998 - 02:29:45 CST

Original text of this message

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