SQL PLUS SELECT STATEMENT - HELP ME ASAP!!!
Date: 1995/10/04
Message-ID: <44uhcm$5i4_at_centauri.hq.nasa.gov>#1/1
I am currently taking a class with a project in SQLPLUS for Oracle. I can do the same
SQL SELECT statement in Foxpro 2.6 with no problem, but cannot do it the same way in
SQLPLUS. Here is the problem:
In Foxpro my select statement is:
What is the correct syntax to get the output that I need?
I have two tables:
Student - St_no, St_fname, St_mname, St_lname
Enroll - St_no, course
I am trying to create the following listing:
St_no, St_fname, St_mname, St_lname, load_this_semester (count of
enrollment records for each student).
SELECT Student.St_no, Student.st_fname, Student.st_mname, Student.st_lname,
COUNT(Enroll.St_no)
FROM Student, Enroll
WHERE Enroll.St_no = Student.St-no
GROUP BY Student.St_no;
In SQLPLUS this statement works fine if I leave the student name fields out, but,
of course, it only lists the student number and enrollment count.
Please help. This is due next Wednesday, and I can't find an Oracle book or user
anywhere here, only Sybase.
THX.
Kelly Ann Conboy