create procedure spsCheckMsg(
@sTyp as varchar(100),
@tMsg as text) as
select @tMsg = md_body from tbl_msgdef where msgname = @sTyp
Parameters of the type text can be used in stored procedures. So I wanted to get the text data (md_body) by a select statement and pass it to the parameter @tMsg. This code doesn't work. I always get the message "The assignment operation can't have a text datatype as argument" which refers to the select statement.