WebSite Professional Server Self Test

StudentsInClass Query

Robert B. Denny (18-Nov-95)
Database View
Used to get a list of students in a class, by name. This query contains a parameter [pClass], the the name of the class for the list.
PARAMETERS pClass Text;
SELECT DISTINCTROW Students.Name, Students.Major
FROM Students 
    INNER JOIN (Classes 
        INNER JOIN StudentsAndClasses 
        ON Classes.ClassID = StudentsAndClasses.ClassID) 
    ON Students.StudentID = StudentsAndClasses.StudentID
WHERE ((Classes.ClassName=[pClass]));


WebSite Tech Support