appending an ntext field

Say you want to do something like this:

update table set ntextThing = ntextThing + '!' where id = 1

That's not going to work. This does, though:

DECLARE @ptrval binary(16)
SELECT @ptrval = TEXTPTR(ntextThing)
FROM item
WHERE id =1
UPDATETEXT table.ntextthing @ptrval NULL 0 '!'
GO

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)

Psykel blog uses BlogCFC (by Raymond Camden). Layout design inspired by arcsin