Extremely new to queries and still don't understand quite how they work, but I have a query that is almost working the way I would like. :banghead:
SELECT StudentInformation.[790ID], StudentInformation.LastName, StudentInformation.FirstName, StudentInformation.DegreeType, CourseTaken.CourseType, CourseTaken.CourseStatus, CourseTaken.DepartmentID, CourseTaken.Term, CourseTaken.Year, CourseTaken.Units, CourseTaken.Grade, CourseTaken.Transfer, UnitTotal.TotalCredits
FROM (StudentInformation INNER JOIN CourseTaken ON StudentInformation.[790ID] = CourseTaken.[790ID]) INNER JOIN UnitTotal ON StudentInformation.[790ID] = UnitTotal.[790ID]
WHERE (((StudentInformation.[790ID])="790-61-5935") AND ((CourseTaken.CourseStatus)="completed"))
ORDER BY CourseTaken.CourseType;
It is pulling the information I need, but the DepartmentID is just displaying the auto number (10 or 11) instead of "Department ID = PB 510 CName"
The department ID field pulls from this:
I tried adding the Courses table and pulling the three fields but it does not return any information when I did that. then i tried adding the courses table and linking the student information table deptID field to the three fields but again nothing returned.
any help would be greatly appreciated. I have added the return the way the top is wrote.
SELECT StudentInformation.[790ID], StudentInformation.LastName, StudentInformation.FirstName, StudentInformation.DegreeType, CourseTaken.CourseType, CourseTaken.CourseStatus, CourseTaken.DepartmentID, CourseTaken.Term, CourseTaken.Year, CourseTaken.Units, CourseTaken.Grade, CourseTaken.Transfer, UnitTotal.TotalCredits
FROM (StudentInformation INNER JOIN CourseTaken ON StudentInformation.[790ID] = CourseTaken.[790ID]) INNER JOIN UnitTotal ON StudentInformation.[790ID] = UnitTotal.[790ID]
WHERE (((StudentInformation.[790ID])="790-61-5935") AND ((CourseTaken.CourseStatus)="completed"))
ORDER BY CourseTaken.CourseType;
It is pulling the information I need, but the DepartmentID is just displaying the auto number (10 or 11) instead of "Department ID = PB 510 CName"
The department ID field pulls from this:
SELECT Courses.[CourseID], [Courses].[DepartmentID], [Courses].[CourseNo], Courses.[CourseName] FROM Courses ORDER BY [DepartmentID], [CourseNo], [CourseName];
How do I get it to display the deptid (PB) c# (510) and name (CName)?
I tried adding the Courses table and pulling the three fields but it does not return any information when I did that. then i tried adding the courses table and linking the student information table deptID field to the three fields but again nothing returned.
any help would be greatly appreciated. I have added the return the way the top is wrote.
Last edited:



