Reputation: 577
Is it possible to convert from ntext to varchar in SQL Server?
This is the syntax: ALTER TABLE TBL1 ALTER COLUMN email varchar NULL.
This is the error message: Cannot alter column 'email' because it is 'ntext'.
Thanks in advance.
Upvotes: 1
Views: 2797
Reputation: 452947
Are you definitely on SQL Server 2005 - Not 2000?
I tested the following and couldn't get the same error message as you
CREATE TABLE TBL1
(
email NTEXT NOT NULL
)
INSERT INTO TBL1 VALUES (N'ghfhfhgtf')
ALTER TABLE TBL1 ALTER COLUMN email varchar NULL
/*Error: String or binary data would be truncated.*/
ALTER TABLE TBL1 ALTER COLUMN email nvarchar (max)
/*Works*/
Upvotes: 1