The text, ntext, or image data type cannot be selected as DISTINCT.
When querying, Microsoft® SQL Server™ does not allow the use of SELECT DISTINCT on a text, ntext, or image column. For example, this query fails, returning error 8163:
USE Northwind
SELECT DISTINCT Description
FROM Categories
Remove references to any text, ntext, or image columns when using SELECT DISTINCT.
Eliminating Duplicates with DISTINCT | Query Fundamentals |
Errors 8000-8999 | SELECT |