title: GROUP BY for ntext data
body: <p>I would like to see how many times the field <code>MSGTEXT</code> is repeated in the table <code>MMOUTBOUND</code>. For that I use the following query:</p>
  
  <pre><code>SELECT 
      MSGTEXT, 
      COUNT(*) TotalCount 
  FROM MMOUTBOUND 
  GROUP BY MSGTEXT 
  HAVING COUNT(*)&gt;1;
  </code></pre>
  
  <p>But I get an error because ntext data types cannot be compared or sorted. How can I achieve this for the ntext data type?</p>