|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
ORA-00933: SQL command not properly ended
Hi,
Seeing as you kindly managed to help me out last time, I wonder if you could point me in the right direction with this? The question I got was: Display all data held for each module occurrence except the lecturers man no, plus the module name and lecturer name and a count of the number of students signed up. I tried my code but it gave me this error: SQL> SELECT MODULECODE CODE, YEAR, SEMESTER, OCCURRENCE, CAP 2 FROM MODULEOCCURRENCE 3 JOIN MODULE.NAME, LECTURER.FIRSTNAME, LECTURER.SURNAME 4 FROM MODULE, LECTURER, MODULEOCCURRENCE 5 WHERE MODULE.MODULECODE = MODULEOCCURRENCE.MODULECODE 6 AND LECTURER.LECTURERNO = MODULEOCCURRENCE.LECTURERNO 7 UNION 8 SELECT COUNT(*) "STUDENTS" 9 FROM MODULEOCCURRENCESTUDENT, STUDENT 10 WHERE MODULEOCCURRENCESTUDENT.STUDENTNO = STUDENT.STUDENTNO; JOIN MODULE.NAME, LECTURER.FIRSTNAME, LECTURER.SURNAME * ERROR at line 3: ORA-00933: SQL command not properly ended What am I doing wrong? Thanks for looking. |
|
#2
|
|||
|
|||
|
The question really states:
Select everything from 1 table EXCEPT the LECTURERNO (can this be done with a minus or something?) Then add the module name and lecturer name Then a count of the number of students signed up. (That's covered I think with: SELECT COUNT(*) "STUDENTS" FROM MODULEOCCURRENCESTUDENT, STUDENT WHERE MODULEOCCURRENCESTUDENT.STUDENTNO = STUDENT.STUDENTNO ![]() Thought that may be easier to understand ![]() |
|
#3
|
|||
|
|||
|
Have I stumped everybody?
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > ORA-00933: SQL command not properly ended |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|