Error 8163

Troubleshooting SQL Server

Troubleshooting

Error 8163

Severity Level 16
Message Text

The text, ntext, or image data type cannot be selected as DISTINCT.

Explanation

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
Action

Remove references to any text, ntext, or image columns when using SELECT DISTINCT.

See Also

Eliminating Duplicates with DISTINCT

Query Fundamentals

SELECT