
SQL 6.5 - text field to varchar(255) fields
Alas, you have to drill down on each text row.
Alternative:
BCP the whole shooting match out to disk then use some string tools (awk?)
to convert each row into a script with a series of inserts of the proper
length.
Run the script to insert the whole thing back in.
Russell Fields, SQL Server MVP
Quote:
>I'm trying to convert a text field to several varchar(255) fields in
>SQL 6.5
>I have a table with about 800,000 records that need to be converted ->
>moved to a new table. I have tried (and failed) using readtext in a
>cursor. I can do it if I drill down to one record, but I obviously do
>not want to do this 800,000 times.
>Any help would be greatly appreciated.
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.