how to write more than 8000 chars in text column in trigger (sql2k)
CREATE TRIGGER TR_SAMPLE INSTEAD OF
DECLARE @ptrval varbinary(16)
DECLARE @value1 varchar(8000)
DECLARE @value2 varchar(8000)
DECLARE @id int
SELECT @id = id from inserted
Select @ptrval = TEXTPTR(columnname) from tablename where id=@id
WRITETEXT table.columnname @pt开发者_C百科rval @value1+@value2
gives error :
incorrect sytax near '+'
Try doing it as a 2 step process.
WRITETEXT table.columnname @ptrval @value1
UPDATETEXT table.columnname @ptrval NULL 0 @value2
精彩评论