Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old April 21st, 2004, 04:13 PM
modality modality is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 18 modality User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 27 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old April 22nd, 2004, 04:26 AM
modality modality is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 18 modality User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 27 sec
Reputation Power: 0
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

Reply With Quote
  #3  
Old April 25th, 2004, 05:53 PM
modality modality is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 18 modality User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 27 sec
Reputation Power: 0
Have I stumped everybody?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > ORA-00933: SQL command not properly ended


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway