How to convert NTEXT to NVARCHAR(MAX)


John Conwell has a post about the issues associated with the conversion of NTEXT to NVARCHAR(max) in SQL Server 2005 back in 2008. http://geekswithblogs.net/johnsPerfBlog/archive/2008/04/16/ntext-vs-nvarcharmax-in-sql-2005.aspx

The observation and fix he found in SQL Server 2005 is still true in SQL Server 2008 and SQL Server 2012.

Here is the the tak aways from his post which still apply to SQL Server 2008/2012:

You need to do an UPDATE to the column which is converted from ntext to nvarchar(max) after the alter table alter column statement.

ALTER TABLE testTable ALTER COLUMN testText NVARCHAR(MAX) null

 

Do this:
UPDATE testTable SET testText = testText

 

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s