Question : The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator

HI,

How can I get around this error?  I am using sql server 2000

One of my columns is "ntext" datatype.

my query has a Count() function so I am using group by and I think this error happens when I try to group on an NTEXT datatype field.

Any help appreciated

-ws

Answer : The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator

Than your best option is my first suggestion:
GROUP BY CAST(YourNTextColumnName AS varchar(4000))

Just understand that it will not group more than 4000 characters.
Random Solutions  
 
programming4us programming4us