SQL 6.5 - text field to varchar(255) fields 
Author Message
 SQL 6.5 - text field to varchar(255) fields
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.***.com/
Share what you know. Learn what you don't.



Sat, 12 Jan 2002 03:00:00 GMT
 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.



Sat, 12 Jan 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Using a text field to combine multiple varchar(255) fields

2. Selecting a text field greater than 255 characters - SQL 6.5

3. Cannot retrieve MS-SQLServer VARCHAR(n>255) or TEXT field in Delphi program

4. Text fields into many varchar(255)'s

5. Converting Substring of Text field to Varchar in SQL 6.5

6. varchar(255) data truncation from SQL Server 6.5 to 7.0

7. varchar 255 character restriction in SQL 6.5

8. Truncation of text fields to 255 chars in SQL select

9. DBLibrary access VarChar field larger than 255 bytes

10. Storing more that 255 Characters in a VarChar field

11. DTS and varchar field are truncating at 255 chararacters

12. DB-LIB varchar fields limited to 255 characters


 
Powered by phpBB® Forum Software