I have [tbl_AllStudentsEmail] where I get my students distribution list. I also have [tbl_CourseID] where some students are registered (not all). Students record are registered here along with the COURSEID.
Conditions: A student can be registered in several courses.
My goal is that I want to select all the students who are not registered to the course ID. How do I go about that?
Select [StudentID], [StudentName], [StudentEmail], [CourseID] from [tbl_AllStudentsEmail] left join tbl_CourseID on tbl_CourseID.StudentID = tbl_AllStudentsEmail.StudentID where CourseID = 11 and tbl_AllStudentsEmail.StudentID is not null
This statement gives me a problem. It would give me "dupe" students email when the student is registered to course ID = 9 and CourseID = 10.
How can i get the UNIQUE student email out?