开发者

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 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜