PDA

View Full Version : MS Access SQL Query help?


ymcabookwormcat
10-10-2007, 07:30 AM
Using the schemas:
•student(sid, sname, sex, age, year, gpa)
•dept(dname, numphds)
•prof(pname, dname)
•course(cno, cname, dname)
•major(dname, sid)
•section(dname, cno, sectno, pname)
•enroll(sid, grade, dname, cno, sectno)

I need to:

""Print the ids, names, and GPAs of the students who are currently taking all of the Civil Engineering courses.""


This is what I have so far:
SELECT e.sid, e.cno
FROM enroll e, student s, course c
WHERE s.sid = e.sid AND e.cno AND c.dname = "Civil Engineering'

That gives me the sids and cnos that the students are taking. I have another query that prints out the s.sid, s.sname, and s.gpas of all the students enrolled in a Civil Engineering course but I don't know how to use the ALL statement to do that the people who are enrolled in the C.Engineering courses are taking ALL of them. I've never used one before and the book example isn't helping. I have the DB if that would help.
E-mail me if u need that : andreadawn86@earthlink.net