LearnItFirst User Forum

New SQL Server 2008 DBA Course
Welcome Guest Search | New Posts | Members | Log In | Register

Cursor and procedure Options
snow
Posted: Sunday, May 18, 2008 11:38:07 PM
Rank: Newbie

Joined: 5/18/2008
Posts: 1
Points: 3
hello:

Actually problem is ntext hold > 4000 char. I need to split ntext data into the segnments with 4000 char. Then put those segnments to the another table. For example: The ntext data string has 12000 char. The another table has the char field. The column has segnment1(4000 char), segnment2(4000 char), segnment 3(4000 char) which come from the splitting ntext data sting with 12000 char.

I declare the cursor, but I got the error: The text, ntext, and image data types are invalid for local variables.


How to make it work?

Thanks for the help.
Scott Whigham
Posted: Wednesday, May 21, 2008 6:48:16 AM


Rank: Super Mod

Joined: 3/20/2006
Posts: 460
Points: 1,002
Where do you live?: Dallas, TX
So you're stuck on SQL 2000 or can you use SQL 2005? If you can use SQL 2005/2008, just use the NVARCHAR(MAX) data type instead of ntext. If you have to use SQL 2000, check out the comments here for ideas: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=31893
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.