|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
The following tables exist QuizTable QuizID (primary key) Title Description IsAvailable UserQuizTable UserQuizID (PK) QuizID (FK) DateTimeComplete Score UserName I need to develop a stored procedure that will return all of the quizes from the QuizTable that are available and that a particular user has not yet taken. To return a list of quizes with no entries at all in the UserQuiz table, I'm using the following SQL: select Quiz.QuizID, Quiz.Title, Quiz.Description, Quiz.IsAvailable FROM Quiz Left Outer Join UserQuiz ON Quiz.QuizID = UserQuiz.QuizID Where UserQuiz.QuizID is null AND Quiz.IsAvailable=0 This is only getting me 1/2 the way to where I need to end up. Any suggestions greatly appreciated. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > SP for selecting available quizes |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|