June 29, 2015 at 8:36 am
What would be the best process to change the datatype of ntext fields.
I assume just changing the datatype - is not the way to go?
Anyone with experience of moving on from ntext?
Thanks
June 29, 2015 at 9:15 am
June 29, 2015 at 9:44 am
Yes, either that or case by case basis maybe nvarchar(x)
June 29, 2015 at 9:49 am
You should be able to just change the datatype from ntext to nvarchar(max). When you want to limit the length though you will get a warning that you might lose data because you are changing the datatype length to a shorter datatype.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
June 29, 2015 at 9:58 am
Mostly what Sean said. I just wanted to add that if you want to be sure that you're not losing data, you can do some checks before changing the datatype.
June 29, 2015 at 10:08 am
Thanks for your replies!
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply