select ID_NUM as ID_num, LAME1, RESP_CODE as RESP_CODE1,cast(QUERY_COMM as nvarchar(max)) as QUERY_COMM1
from dbo.DRGQueries
group by ID_NUM, LAME, RESP_CODE,QUERY_COMM
having COUNT(*) >1
where I have Query_comm as ntext as datatype and
Resp_code nvarchar(50) in the above table.
I am getting the error message
"The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator."
Thanks,
Haimanti