cuconsortium
asked on
T-SQL: Remove Duplicates in Select statements with ntext data type
Hi experts,
I'm writing a select statments witht ntext data type field. This select statment requires a Union operator. Since Sql Server 2005 gave me an error "The ntext data type cannot be selected as DISTINCT because it is not comparable", I have to change Union to Union All. When Union All is used, the statment works without error. However, it returns duplicate rows.
How do I eliminate these the duplicated rows from the select statment?
Thank you!!!
I'm writing a select statments witht ntext data type field. This select statment requires a Union operator. Since Sql Server 2005 gave me an error "The ntext data type cannot be selected as DISTINCT because it is not comparable", I have to change Union to Union All. When Union All is used, the statment works without error. However, it returns duplicate rows.
How do I eliminate these the duplicated rows from the select statment?
Thank you!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or batter yet, cast (mycolumn as nvarchar(max)), which has no such limitations
ASKER