The text data type cannot be selected as DISTINCT because it is not comparable
Filed in Database on May.01, 2009
When I tried to select a table which includes a text type field using distinct. I got these error:
The text data type cannot be selected as DISTINCT because it is not comparable
The solution is convert text to VARCHAR(MAX).
CONVERT(VARCHAR(MAX), text_type_filedname)
Varchar(Max) is a LOB datatype and has a max size of 2GB.

Tags: SQL

Leave a Reply