December 10, 2004 at 1:52 pm
I am getting this error when I run the following script:
Server: Msg 7135, Level 16, State 4, Procedure SearchReplace, Line 24
Deletion length 5 is not in the range of available text, ntext, or image data.
I dont get it.
SET NOCOUNT ON
DECLARE
@TextPointer varbinary( 16 )
DECLARE
@DeleteLength int
DECLARE
@OffSet int
SELECT
@TextPointer = textptr( Body)
FROM
PageContent
SET
@DeleteLength = len( 'dev1/' )
SET
@OffSet = 0
WHILE
( SELECT count( * )
FROM
PageContent
WHERE patindex
( '%' + 'dev1/' + '%', Body) <> 0
) > 0
BEGIN
SELECT
@OffSet = patindex( '%' + 'dev1/' + '%', Body) - 1
FROM
PageContent
WHERE patindex
( '%' + 'dev1/' + '%', Body) <> 0
@TextPointer
@OffSet
@DeleteLength
END
Return
December 10, 2004 at 3:20 pm
You might want to post the full script, this piece doesn't do anything that would generate that error.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply