Note: This code is written and intended for use in Microsoft Access and will not work in the SQL Server Query Analyzer.


SELECT

dbo_EA7RECORDS.LASTNAME, dbo_EA7STUDENTS.EA7STUDENTSID, dbo_SCHOOLS.DESCRIPTION,

dbo_EA7COURSES.COURSENAME, dbo_EA7TERMS.STARTDATE, dbo_TABLEENTRIES.DESCRIPTION,

dbo_EA7BLOCKMEETINGS.STARTTIME, dbo_EA7BLOCKMEETINGS.ENDTIME,

dbo_EA7CYCLEDAYS.DAY, dbo_EA7RECORDS_1.LASTNAME

FROM

(((((((((((((((dbo_EA7STUDENTCOURSES INNER JOIN dbo_EA7COURSES ON

dbo_EA7STUDENTCOURSES.EA7COURSESID = dbo_EA7COURSES.EA7COURSESID)

INNER JOIN (dbo_EA7SESSIONS INNER JOIN dbo_EA7ACADEMICYEARS ON

dbo_EA7SESSIONS.EA7ACADEMICYEARSID = dbo_EA7ACADEMICYEARS.EA7ACADEMICYEARSID) ON

dbo_EA7STUDENTCOURSES.EA7SESSIONSID = dbo_EA7SESSIONS.EA7SESSIONSID) INNER JOIN

(dbo_EA7STUDENTS INNER JOIN

dbo_EA7RECORDS ON dbo_EA7STUDENTS.EA7RECORDSID = dbo_EA7RECORDS.EA7RECORDSID) ON

dbo_EA7STUDENTCOURSES.EA7STUDENTSID = dbo_EA7STUDENTS.EA7STUDENTSID) INNER JOIN

dbo_EA7STUDENTCOURSETERMS ON

dbo_EA7STUDENTCOURSES.EA7STUDENTCOURSESID = dbo_EA7STUDENTCOURSETERMS.EA7STUDENTCOURSESID)

INNER JOIN dbo_EA7CLASSTERMS ON

dbo_EA7STUDENTCOURSETERMS.EA7CLASSTERMSID = dbo_EA7CLASSTERMS.EA7CLASSTERMSID)

INNER JOIN dbo_EA7CLASSES ON dbo_EA7CLASSTERMS.EA7CLASSESID = dbo_EA7CLASSES.EA7CLASSESID)

INNER JOIN dbo_EA7CLASSTERMMEETINGS ON

dbo_EA7CLASSTERMS.EA7CLASSTERMSID = dbo_EA7CLASSTERMMEETINGS.EA7CLASSTERMSID) LEFT JOIN

dbo_EA7FACULTYCLASSTERMMEETINGS ON

dbo_EA7CLASSTERMMEETINGS.EA7CLASSTERMMEETINGSID = dbo_EA7FACULTYCLASSTERMMEETINGS.EA7CLASSTERMMEETINGSID)

LEFT JOIN dbo_EA7FACULTY ON

dbo_EA7FACULTYCLASSTERMMEETINGS.EA7FACULTYID = dbo_EA7FACULTY.EA7FACULTYID) LEFT JOIN

dbo_EA7RECORDS AS dbo_EA7RECORDS_1 ON

dbo_EA7FACULTY.EA7RECORDSID = dbo_EA7RECORDS_1.EA7RECORDSID) INNER JOIN

dbo_EA7TERMS ON dbo_EA7CLASSTERMS.EA7TERMSID = dbo_EA7TERMS.EA7TERMSID) INNER JOIN

dbo_TABLEENTRIES AS dbo_TABLEENTRIES_1 ON dbo_EA7TERMS.TERMID = dbo_TABLEENTRIES_1.TABLEENTRIESID) INNER JOIN

dbo_EA7CYCLEDAYS ON dbo_EA7CLASSTERMMEETINGS.EA7CYCLEDAYSID = dbo_EA7CYCLEDAYS.EA7CYCLEDAYSID) INNER JOIN

dbo_SCHOOLS ON dbo_EA7ACADEMICYEARS.SCHOOLSID = dbo_SCHOOLS.SCHOOLSID) INNER JOIN

dbo_TABLEENTRIES ON dbo_EA7ACADEMICYEARS.YEARID = dbo_TABLEENTRIES.TABLEENTRIESID) INNER JOIN

dbo_EA7BLOCKMEETINGS ON dbo_EA7CYCLEDAYS.EA7CYCLEDAYSID = dbo_EA7BLOCKMEETINGS.EA7CYCLEDAYSID

WHERE

(((dbo_EA7STUDENTS.EA7STUDENTSID)=2) AND ((dbo_TABLEENTRIES.DESCRIPTION)="2003-2004"));

Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Structured Query Language and the tools used to create and modify SQL statements and Crystal Reports. Our Customer Support may help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality.