Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Changing columns from VARCHAR to NVARCHAR

Author  Topic 

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2008-08-25 : 06:22:09
Hi all,

In the name of internationalisation, our company want to change all the columns of our base tables (most of them anyway) that were declared as VARCHAR(xxx) columns into NVARCHAR(xxx) columns.

Now to do this any index / constraint that references that column must be dropped, the column changed, and then the index / whatever reinstated.

Before I go off and try to write some dynamic ******* of a stored proc to do this I thought I'd see if this has come up before and if one of you kind guru's had written it already.

I'm looking for a sp that will accept a table name and then change the columns required (dropping any references in the db to the said column on that or other tables, and then recreating them after).

Any comments / suggestions would be appreciated.

Regards,

-------------
Charlie

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2008-08-25 : 12:21:47
Cautious Bump.

-------------
Charlie
Go to Top of Page
   

- Advertisement -