CipherIS
asked on
SQL Server - SQL field is defined as text
I have a question. I'm working on a database and attempted to perform a DISTINCT and received an error. After further investigation I found that the DISTINCT could not be performed because the field is defined as "text" and not "VARCHAR" or "NVARCHAR".
My understanding that "text" will be deprecated.
Can the field be easily updated with VARCHAR?
My understanding that "text" will be deprecated.
Can the field be easily updated with VARCHAR?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, that is what I had to do. I used CONVERT though. I'm just analyzing the database.
SELECT DISTINCT ..., CAST(text_column AS varchar(max)), ...
FROM ...