Created
March 31, 2015 21:32
-
-
Save hanleybrand/bd3af96cef1b26ff2f08 to your computer and use it in GitHub Desktop.
checking the select queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use bb_bb60; | |
| declare @COURSEID varchar(200) | |
| declare @COURSEPK int | |
| set @COURSEID = '111111111111' | |
| set @COURSEPK = (select pk1 from course_main where course_id = '111111111111') | |
| print @coursePK | |
| SELECT * | |
| FROM group_attempt_files where group_attempt_pk1 in( | |
| select pk1 from group_attempt where gradebook_main_pk1 in ( | |
| select pk1 from gradebook_main where crsmain_pk1 in ( | |
| select pk1 from course_main where course_id = @COURSEID) | |
| ) and groups_pk1 is NULL); | |
| SELECT * | |
| FROM attempt where group_attempt_pk1 in ( | |
| select pk1 from group_attempt where gradebook_main_pk1 in ( | |
| select pk1 from gradebook_main where crsmain_pk1 in ( | |
| select pk1 from course_main where course_id = '111111111111' | |
| ) | |
| ) and groups_pk1 is NULL); | |
| SELECT * | |
| FROM attempt where group_attempt_pk1 in ( | |
| select pk1 from group_attempt where gradebook_main_pk1 in ( | |
| select pk1 from gradebook_main where crsmain_pk1 = @COURSEPK) | |
| and groups_pk1 is NULL); | |
| SELECT * | |
| FROM group_attempt where pk1 in( | |
| select pk1 from group_attempt where gradebook_main_pk1 in ( | |
| select pk1 from gradebook_main where crsmain_pk1 in ( | |
| select pk1 from course_main where course_id = @COURSEID | |
| ) | |
| ) and groups_pk1 is NULL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the problem seems to be that the
SELECT * FROM attemptquery doesn't return any results