By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

How to check whether a student has already completed a prerequiste for a course

P: 2
Expand|Select|Wrap|Line Numbers
  1. SELECT CP.CoursePrerequisite AS [missing prereq]
  2. FROM CoursePrerequisite AS CP
  3. WHERE (((CP.CourseCode)="EGCE 308")
  4. AND (CP.CoursePrerequisite) NOT IN (SELECT StudentCourse.CourseCode FROM StudentCourse WHERE cwid = 987654321));
  5.  
The query is returning all the prerequisites required for the course vs which prerequisites the student has not completed. I want the output to have only the prerequisite(s) the student hasn't completed. This query works fine on SQL SERVER 2016 but is not returning the right result set on MS ACCESS. I tried making the ACCESS DATABASE ANSI92 compatible, however it's not returning the right output.

Please advise/assist at your earliest as I've a deadline to meet
Mar 22 '17 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.