DISTINCT on a Memo/Text Field

G

Guest

Hello All

I am trying to run a DISTINCT query on Memo/Text field. I am getting an
error message "The text, ntext, or image data type cannot be selected as
DISTINCT". Is it possible to query the unique values in a memo/text field. If
so fill me in on it or if no, please explain.

Thanks In Advance
kw_uh97
 
G

Guest

I found a knowledge base article on this error message, but it just says SQL
SERVER does not allow this. Any more leads?

This article was previously published under Q162032
SUMMARY
SQL Server 6.5 no longer allows a 'SELECT DISTINCT * FROM <table>' if that
table has a text/image column. If you attempting to perform such a query, you
will receive the following error message:

Msg 8163: Text/Image datatype cannot be selected as DISTINCT.

Earlier versions of SQL Server treated this as a valid query if the table
contained a unique index or primary key, whose existence would guarantee that
the row was distinct. In the presence of such an index, the following message
would have been raised:

Msg 421: TEXT and IMAGE datatypes may not be selected as DISTINCT.
SQL Server has never allowed a DISTINCT operation on an individual text
or image column.

Thansk In Advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top