Need simple way to convert all nchar to nvarchar
Posted on 2011-04-21
I am trying to change all of my fields on the database that are of type "nchar" to "nvarchar", but I'm finding this a much more difficult task than I thought it would be--unless I'm just missing something. I am able to get all of my nchar fields, but many of them are tied to indexes, so when I run my conversion, it errors on any field that has an index tied to it.
Is there a way I could convert these fields easily to nvarchar and make sure the indexes are put back intact once it's done converting the fields without having to do them one by one? That could take forever.
And in case you're wondering, there is good reason for the conversion to nvarchar, needless to say, space.