Assume a table structure:
Create Table Question
{
ID int pk,
Category varchar
Stem varchar,
AnswerA varchar,
...
AnswerD varchar,
Correct char,
isMandatory bit
}
For a given category, there are approximately 50 questions. There can be 1-10 mandatory questions.
I need to select all mandatory questions, and then enough other questions at random to make a question set of 20 questions.