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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Reading data from a NText field

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-07-07 : 05:29:01
J Vijayaraghavan writes "Hi,

I need to read a NTEXT data from a table and pass that as an argument to my SP. As SQL doesn't allow NTEXT variables to be declared and assigned values I couldn't go ahead.

I know how to read the NTEXT using READTEXT. But want to use it as an argument to my SP ?

Can you please help..

Regards"

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2005-07-07 : 09:41:53
There are some good articles on this site for dealing with ntext/text data.

The simplest solution is if the maximum length of the values in your ntext column is less than 4000 characters. If it is, change it to nvarchar (or varchar to get 8000 characters) and your problems are solved.

Otherwise you will either need to use an application to read and write your ntext values or use some ugly combination of reading substrings into (n)varchar variables and writetext and/or updatetext to write chunks of data into the target column.



Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -