Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hi spirit1,Thanks for the quick reply. I should have mentioned that I have a table with lots of data in it and I need to preserve all the data while expanding the nvarchar(3000) to ntext. It's a survey db and a lot of the respondents are on the verbose side.Is there an easy way to do this?
spirit1
Cybernetic Yak Master
11752 Posts
Posted - 2005-03-08 : 14:29:34
the best way is:1. put the data from you table into a temp table.2. drop the table and indexes3. create a table with ntext field4. insert data from temp table into new table5. recreate indexes.5 minutes and you're done. Go with the flow & have fun! Else fight the flow
Zim327
Yak Posting Veteran
62 Posts
Posted - 2005-03-08 : 14:48:25
how exactly do I recreate the indexes?I want the numbering to start back up right where it stopped at 13717
spirit1
Cybernetic Yak Master
11752 Posts
Posted - 2005-03-08 : 15:00:44
create index .... blah blah... whatever index you have now.... look the syntax in BOL. or just do it in Enterprise manager.well you can insert into an idetity column if you do:SET IDENTITY_INSERT YourColumnName ONGo with the flow & have fun! Else fight the flow
Zim327
Yak Posting Veteran
62 Posts
Posted - 2005-03-08 : 15:45:39
It worked!thanks for your help spirit1!Best regards,Zim