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 -> Query returning a missing expression error

Query returning a missing expression error

From: <whyme_at_nowhere.com>
Date: Sun, 23 Jun 2002 00:13:19 GMT
Message-ID: <cg4ahuobhgg2v7d6p48nlcb96oqng3jl08@4ax.com>


Here is my query:

SELECT SUM(max_enrl), AVG(max_enrl), MAX(max_enrl), MIN(max_enrl), FROM course_section
WHERE term_id = 2;

ERROR at line 2:
ORA-00936: missing expression

What expression am I missing?

Here is the table:

CREATE TABLE COURSE_SECTION
(c_sec_id NUMBER(6),
course_id NUMBER(6) CONSTRAINT course_section_courseid_nn NOT NULL, term_id NUMBER(6) CONSTRAINT course_section_termid_nn NOT NULL, sec_num NUMBER(2) CONSTRAINT course_section_secnum_nn NOT NULL, faculty_id NUMBER(5),
day VARCHAR2(10),
time DATE,
bldg_loc VARCHAR2(10),
loc_id NUMBER(6),
max_enrl NUMBER(4) CONSTRAINT course_section_maxenrl_nn NOT NULL, CONSTRAINT course_section_csec_id_pk PRIMARY KEY (c_sec_id), CONSTRAINT course_section_cid_fk FOREIGN KEY (course_id) REFERENCES course(course_id),
CONSTRAINT course_section_loc_id_fk FOREIGN KEY (loc_id) REFERENCES location(loc_id),
CONSTRAINT course_section_termid_fk FOREIGN KEY (term_id) REFERENCES term(term_id),
CONSTRAINT course_section_fid_fk FOREIGN KEY (faculty_id) REFERENCES faculty(faculty_id));

Thanks Received on Sat Jun 22 2002 - 19:13:19 CDT

Original text of this message

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