错误提示:
Server: Msg 170, Level 15, State 1, Procedure Manage_FAQ_Begin, Line 18
Line 18: Incorrect syntax near '@noteptr'.
Server: Msg 170, Level 15, State 1, Procedure Manage_FAQ_Begin, Line 18
Line 18: Incorrect syntax near '@noteptr'.
@userid int,
@id int,
@Topicid int,
@State varchar(5) output,
@Answer text ='1111111111111111111111111111111111111111111112222222222'output
asgo
这样好像可以通过呀!
TEXTVALID 函数用来检查指定的文本指针是否有效。
文本指针被传递到用于操作 text、ntext 和 image 数据的 READTEXT、UPDATETEXT、WRITETEXT、PATINDEX、DATALENGTH 和 SET TEXTSIZE Transact-SQL 语句。
对于 TEXTPTR 函数,只有 text、ntext 和 image 列有效。
create procedure Manage_FAQ_Begin
@userid int,
@id int,
@Topicid int,
@State varchar(5) output,
@Answer text output
as
declare @noteptr binary(16)
select @State = 'add'
select @noteptr = textptr(@Answer)
--writetext @Answer @noteptr '1111111111111111111111111111111111111111111112222222222'
go
@userid int,
@id int,
@Topicid int,
@State varchar(5) output,
@Answer text output
as
declare @noteptr binary(16)
select @State = 'add'
Declare abc CURSOR FOR Select '1111111111111111111111111111111111111111111112222222222' as Txt
Open abc
FETCH NEXT From abc INTO @Answer
Print cast(@Answer as varchar)
Close abc
Deallocate abc
go
我很想知道,谢谢!
前面有几为仁兄说到了怎样赋值(采用函数),我就不谈了,不过我上述不解,希望大家多加探讨!
declare @tt text
declare @ss varbinary(6)set @ss=textptr(info)
set @@tt=convert(text,@ss)
我想对于给变量付值应该只能是用"set" 吧