title: linq sql error : the text data type cannot be selected as distinct because it is not comparable
body: <p>I want to select all questions from the questions table that haven't been included already for a particular quiz.
  My question is why does the below code fail with the message :</p>
  
  <p><strong>The text data type cannot be selected as DISTINCT because it is not comparable.
  The data types text and text are incompatible in the is operator.</strong></p>
  
  <pre><code>var allQuestions = from q in my.Questions
                          select new
                          {
                              Select = new Boolean(),
                              Id = q.QuestionId,
                              QuestionName = q.Name,
                              QuestionText = q.Text,
                              Topic = q.Topic.Title
                          };
  
          var currentQuestions = from cq in my.QuizQuestions
                              where cq.Quiz.quizId == quizId
                              select new
                              {
                                  Select = new Boolean(),
                                  Id = cq.Questions.QuestionId,
                                  QuestionName = cq.Questions.Name,
                                  QuestionText = cq.Questions.Text,
                                  Topic = cq.Questions.Topic.Title
                              };
  var selectQuestions = allQuestions.Except(currentQuestions);
  </code></pre>
  
  <p>Where as this works fine:</p>
  
  <pre><code> var allQuestions = (from q in my.Questions
                          select new
                          {
                              Select = new Boolean(),
                              Id = q.QuestionId,
                              QuestionName = q.Name,
                              QuestionText = q.Text,
                              Topic = q.Topic.Title
                          }).ToList();
  
          var currentQuestions = (from cq in my.QuizQuestions
                              where cq.Quiz.quizId == quizId
                              select new
                              {
                                  Select = new Boolean(),
                                  Id = cq.Questions.QuestionId,
                                  QuestionName = cq.Questions.Name,
                                  QuestionText = cq.Questions.Text,
                                  Topic = cq.Questions.Topic.Title
                              }).ToList();
  
  
          int allquestionsCount = allQuestions.Count();
          for (int i = allquestionsCount; i &lt; 0; i--)
          {
              foreach(var question in currentQuestions){
                  if (question.Id.Equals(allQuestions.ElementAt(i - 1).Id))
                  {
                      allQuestions.RemoveAt(i - 1);
                  }
              }
          }
  </code></pre>