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)
 String Manipulation with Text datatype

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-17 : 09:57:23
Vineet writes "Hi There,
I have this Stored Procedure that has one of the Input parameters as a text datatype. I need to store the contents of this parameter in blocks of 512 bytes long, and each block should be written in a new row in the table.
So I tried using

DECLARE @ptrval varbinary(16)
SET @ptrval = TEXTPTR(@sDescription)

But this is giving me a syntax error - "Only text,ntext and image columns are valid with the TEXTPTR function"

Can you sugest how I can do string manipulations with a text datatype?

Thanks in advance
Vineet"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-01-17 : 09:58:31
You need to insert the value of the text variable into a table. TEXTPTR() cannot get a pointer on a variable. You also cannot create a table variable for it, for the same reason. You can use a regular table or temp table.
Go to Top of Page
   

- Advertisement -