Is their any way to select a field as Distinct whose data type is Text.
If we have a table T1
with a field named Subjects
have data type as Text
.
Subjects
--------
Room
--------
Room
--------
window
--------
Door
--------
Door
--------
If I try this query
Select Distinct (Subjects)
from T1
It gives me this error:
The text data type can not be selected as DISTINCT because it is not comparable
When I use Group by it give me this error:
The data types 'text', 'ntext' and 'image' can be compared or sorted,
except when using IS NULL or LIKE operator.
Is there any solution ? Thanks