moving text columns | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

moving text columns

Hi, I need to move a text column out of one table and stick it in another table. Then the text column will be removed from the original table. As these are just pointers is it possible to just update the text columns in the new table with out having to copy all the data. Its just that there are 5, 000, 000 rows and duplicating this column will probably run the db out of space. Cheers

No, you can’t do that…
You have to join the two tables if there is any common key and once update is complete then delete the column from original table…
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

Yeah, i thought that would be the case Thanks anyway
If you’re in danger to run out of space, do that action in smaller batches to take care of the log between the batches. —
Frank Kalis
Moderator
Microsoft SQL Server MVP
Webmaster:http://www.insidesql.de
Btw, if you’re on SQL Server 2005, why not consider switching to VARCHAR(MAX) when you now make this move. TEXT is deprecated and will not be there anymore in a future version. —
Frank Kalis
Moderator
Microsoft SQL Server MVP
Webmaster:http://www.insidesql.de
]]>